|
Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon. |
|
View previous topic :: View next topic |
Author |
Message |
dariog Smarty n00b
Joined: 30 Jan 2005 Posts: 2
|
Posted: Sun Jan 30, 2005 8:39 am Post subject: SmartyValidate: why won't my assign assign, dammit? |
|
|
Hi,
I'm trying to validate an integer field with smartyValidate.
[php:1:62076909bc]<?php
{validate field="$field_name" criteria="isInt" message="$field_label must be an integer!" assign="anything"}
?>[/php:1:62076909bc]
(The fields are dynamically generated, i.e there is a template for each type of field, and however many of each type are needed are included by a PHP script)
However, when i do:
[php:1:62076909bc]<?php
Errors: {$anything}
?> [/php:1:62076909bc]
There is no output!
Help! |
|
Back to top |
|
dariog Smarty n00b
Joined: 30 Jan 2005 Posts: 2
|
Posted: Sun Jan 30, 2005 8:52 am Post subject: |
|
|
Hey,
Well, figured it out myself. Its something to do with the session vars that SmartyValidate uses to store its data.
The solution is just to flush your session vars (close your browser or call session_destroy()).
Thanks guys, great Add-on! |
|
Back to top |
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|