reCAPTCHA 2 | Form Validation Rules - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived General Discussion (https://forum.codeigniter.com/forumdisplay.php?fid=21) +--- Thread: reCAPTCHA 2 | Form Validation Rules (/showthread.php?tid=18656) |
reCAPTCHA 2 | Form Validation Rules - El Forum - 05-13-2009 [eluser]Dr. Seuss[/eluser] Greetings. Using reCAPTCHA 2 and I have the "basic" code working great. My question is: How do I add additonal form validation rules to the "rules" array that is in the reCAPTCHA 2 sample code? My code--which doe not work--looks like: Code: $rules = array( The additional fields that I am trying to add rules for is obviously in the section: Code: $rules['username'] = "trim|required|min_length[5]|max_length[50]|xss_clean"; ...but that does not work--the form validates even when I submit with these fields totally empty. The form code looks like this: Code: <b>Create Account </b> This is my first go with the form validation class, so I am new to each stitch and if I am doing something stupid, I apologize in advance. reCAPTCHA 2 | Form Validation Rules - El Forum - 05-13-2009 [eluser]Dr. Seuss[/eluser] Whoops. Close this thread. "$this->form_validation->run()" is a reCAPTCHA 2 method, not the CI form validation method. Sorry. Thought it was all be handled by CI. |