|
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 |
IGonza Smarty Rookie
Joined: 14 Jan 2007 Posts: 17
|
Posted: Fri Aug 22, 2008 5:02 pm Post subject: SmartyValidate validator. |
|
|
Hello,
If Code: | SmartyValidate :: is_valid($data, 'form_name') |
returns 0 then it means one of validators returns 0.
Is there anyway to know what validator failed?
Thanks,
Igor. |
|
Back to top |
|
jhiza Smarty Rookie
Joined: 04 Nov 2006 Posts: 6
|
Posted: Thu Aug 28, 2008 4:12 pm Post subject: |
|
|
I dug around the SmartyValidate.class.php file and noticed there is a function called _failed_fields that takes the $formvars and $form as input parameters and returns an array of fields that failed.
line 115.
that help any? |
|
Back to top |
|
IGonza Smarty Rookie
Joined: 14 Jan 2007 Posts: 17
|
Posted: Thu Aug 28, 2008 5:54 pm Post subject: |
|
|
I found that $_SESSION contains all validators results.
So question closed. |
|
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
|