Smarty Forum Index Smarty
The discussions here are for Smarty, a template engine for the PHP programming language.

validator registered, but no message shows upon error

 
Post new topic   Reply to topic    Smarty Forum Index -> Add-ons
View previous topic :: View next topic  
Author Message
kktaus
Smarty n00b


Joined: 30 Jul 2009
Posts: 1

PostPosted: Thu Jul 30, 2009 6:31 pm    Post subject: validator registered, but no message shows upon error Reply with quote

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
View user's profile Send private message
BbErSeRkK
Smarty Rookie


Joined: 04 Jan 2008
Posts: 14

PostPosted: Thu Oct 08, 2009 4:56 am    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Smarty Forum Index -> Add-ons All times are GMT
Page 1 of 1

 
Jump to:  
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
Protected by Anti-Spam ACP