Welcome Guest, Not a member yet? Register   Sign In
Form Validation, Errors
#1

[eluser]oddman[/eluser]
Hey all,

Just a quick question - how exactly does the CI form_validation handle multiple validation methods and its errors? Does it stop validating as soon as a particular field has returned false, or does it execute all validation methods then sets all errors messages? The reason I ask (unable to test atm, at work Tongue) is that I am currently doing this:

Code:
$this->form_validation->set_rule('email', 'required|callback__email_unique');

Basically, I only ever want 1 error per field, and I do not believe it should be executing both, especially if the requirement check fails.

Does CI execute all validation methods, or does it execute each in turn until all validations are successful or it encounters a false return?


Cheers!


Messages In This Thread
Form Validation, Errors - by El Forum - 04-22-2009, 07:54 PM
Form Validation, Errors - by El Forum - 04-23-2009, 02:15 AM
Form Validation, Errors - by El Forum - 04-23-2009, 03:40 AM



Theme © iAndrew 2016 - Forum software by © MyBB