|
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 |
kktaus Smarty n00b
Joined: 30 Jul 2009 Posts: 1
|
Posted: Thu Jul 30, 2009 6:31 pm Post subject: validator registered, but no message shows upon error |
|
|
Hi,
Could someone help me troubleshoot this problem:
The validator is registered, but upon $errors = 1 no error message is showing up.
Code as follows.
php page:
$validator->register_validator('capLevelIsNotZero'.$i, "$equipmentvalue: <= 0 or :capLevel: > 0", 'isConditional');
tpl page:
{validate id="capLevelIsNotZero"|cat:$smarty.section.caplevel.index message="<span class='errorText'>Capitalization Level must be greater than zero if there is an amount in the Equipment/Property category of Project $myProjectNum.</span><br />"}
I have dumped $_SESSION and can confirm that isConditional is finding an error.
Thank you. |
|
Back to top |
|
BbErSeRkK Smarty Rookie
Joined: 04 Jan 2008 Posts: 14
|
Posted: Thu Oct 08, 2009 4:56 am Post subject: |
|
|
did you mistakenly put
Code: | SmartyValidate::connect($smarty,true) |
when you are trying to display the page with the error?
that will wipe the error messages. |
|
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
|