|
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 |
barma3 Smarty Rookie
Joined: 12 May 2005 Posts: 5
|
Posted: Thu Apr 13, 2006 3:57 pm Post subject: SmartyValidate 2.7 problems with "assign" param |
|
|
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 |
|
mohrt Administrator
Joined: 16 Apr 2003 Posts: 7368 Location: Lincoln Nebraska, USA
|
Posted: Fri Apr 14, 2006 10:52 pm Post subject: |
|
|
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 |
|
|
|
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
|