Welcome Guest, Not a member yet? Register   Sign In
Form validation rule question
#1

[eluser]mrh[/eluser]
Hello all...

After searching the forums I figured out from a prior post that for set_value to work you have to define a rule for it in validation rules. So I've done that. For each field I've defined a rule like:

Code:
array (
  'field' => 'directorEmail',
  'label' => '',
  'rules' => 'trim'
  );

My questions are:

a) Do rules in the $config array run in order so that these "trim" rules would run BEFORE any custom rules I create at the end of the array?

b) Do these "trim" rules replace the post value? So I don't have to trim the data later? IE running these rules means I don't need to do trimming in my custom validation functions like this:

Code:
$_POST['directorEmail'] = trim( $_POST['directorEmail'];


Messages In This Thread
Form validation rule question - by El Forum - 07-25-2012, 04:54 PM
Form validation rule question - by El Forum - 07-25-2012, 05:48 PM
Form validation rule question - by El Forum - 07-25-2012, 06:41 PM
Form validation rule question - by El Forum - 07-25-2012, 07:00 PM
Form validation rule question - by El Forum - 07-25-2012, 07:01 PM



Theme © iAndrew 2016 - Forum software by © MyBB