Smarty Forum Index Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon.

SmartyValidate 2.7 problems with "assign" param

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> Add-ons
View previous topic :: View next topic  
Author Message
barma3
Smarty Rookie


Joined: 12 May 2005
Posts: 5

PostPosted: Thu Apr 13, 2006 3:57 pm    Post subject: SmartyValidate 2.7 problems with "assign" param Reply with quote

I cann't assign validate message to template var.

My PHP code is:
[php:1:af1a4bbc00]
SmartyValidate::register_validator('fst', 'fst', 'notEmpty', false, false, 'trim');
[/php:1:af1a4bbc00]


My template code is:

Code:

{validate id="fst" message="Enter you firstname!" assign="error_fst"}



I would put all validators in one place of template and see results in other, but it doesn't work.


If I skip "assign param", I see can see validator's message.

Could somebody help me?
Back to top
View user's profile Send private message Visit poster's website
mohrt
Administrator


Joined: 16 Apr 2003
Posts: 7368
Location: Lincoln Nebraska, USA

PostPosted: Fri Apr 14, 2006 10:52 pm    Post subject: Reply with quote

It is a bug, you can only display the error after the {validate} assignment. As a workaround, place all {validate} tags at the top of the template, before you display an error.
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    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