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

SmartyValidate validator.

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


Joined: 14 Jan 2007
Posts: 17

PostPosted: Fri Aug 22, 2008 5:02 pm    Post subject: SmartyValidate validator. Reply with quote

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


Joined: 04 Nov 2006
Posts: 6

PostPosted: Thu Aug 28, 2008 4:12 pm    Post subject: Reply with quote

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


Joined: 14 Jan 2007
Posts: 17

PostPosted: Thu Aug 28, 2008 5:54 pm    Post subject: Reply with quote

I found that $_SESSION contains all validators results.
So question closed.
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