Welcome Guest, Not a member yet? Register   Sign In
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]';

?>




Theme © iAndrew 2016 - Forum software by © MyBB