![]() |
Help with password validation rules - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: Help with password validation rules (/showthread.php?tid=41269) |
Help with password validation rules - El Forum - 05-03-2011 [eluser]bigspring[/eluser] Hi guys, I've getting well into the swing of using CodeIgniter now. Excellent framework! I have an interesting problem I can't quite work out from the documentation and wondered if one of the community can help. I have an "Add User" form. I have validation set up on all fields, all working fine. The idea is that if an administrator is editing somebody else's user account, they shouldn't have to populate the user's password (or any other) to edit their name / email address / etc. What I want to do is have a form validation function that checks to see if the password field has been populated. I it has, then it should run the other rules I have specified (min length, max length, and a check that both password fields match). If it hasn't, it shouldn't run any further validation rules. Any ideas? Thanks, Jon Help with password validation rules - El Forum - 05-03-2011 [eluser]Akinzekeel[/eluser] How about something like: Code: if($this->input->post("password") !== FALSE) { Help with password validation rules - El Forum - 05-04-2011 [eluser]bigspring[/eluser] A perfectly simple solution that was staring me in the face. Thanks for the help! |