|
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 |
B00zy Smarty Rookie
Joined: 19 Jul 2004 Posts: 12
|
Posted: Mon Jul 19, 2004 5:15 am Post subject: Session Problems |
|
|
I was trying...
Code: |
{validate field="name" criteria="notEmpty"}
|
Now I have changed it to...
Code: |
{validate field="name" criteria="isRegExp" expression="!^\w+$!" message="Name must be composed of only letters [A-Z], numbers [0-9], or the underscore character _"}
|
But looking at the $_SESSION variable, it is still using the last one. I am changing the validate criteria around a lot while developing, is there a sequence I could do this that would update the session upon every refresh of the page? |
|
Back to top |
|
B00zy Smarty Rookie
Joined: 19 Jul 2004 Posts: 12
|
Posted: Mon Jul 19, 2004 7:19 pm Post subject: Fixed |
|
|
I added...
Code: |
session_start();
if (!count($_POST)) {
unset($_SESSION['SmartyValidate']);
}
|
Now refreshes the session when not submitting. Works fine while developing |
|
Back to top |
|
mohrt Administrator
Joined: 16 Apr 2003 Posts: 7368 Location: Lincoln Nebraska, USA
|
Posted: Mon Jul 19, 2004 8:46 pm Post subject: |
|
|
SmartyValidate::disconnect() will accomplish the same thing as this unset FYI. |
|
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
|