• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
small problem with form validation

#1
[eluser]johnman[/eluser]
when you have 2 fields which should match and you trim them both, they should only be compare After they are both trimmed. If you enter 'aaaaa ' into the first one and 'aaaaa ' into the second one, they should match after trimming, but this doesnt't happen.

#2
[eluser]Shadowhand[/eluser]
If you define your Validation rules in the order that you want them processed, this will work properly.

Code:
<?php

// This will process in the following order:
// trim -> required -> trim -> matches
$rules['password'] = 'trim|required';
$rules['passconf'] = 'trim|matches[password]';

?>


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.