CodeIgniter Forums
Form validation: blank fields bug? - 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: Form validation: blank fields bug? (/showthread.php?tid=31309)



Form validation: blank fields bug? - El Forum - 06-14-2010

[eluser]urrmurrmur[/eluser]
When I tried to extend the form validation library to add some validation of my own, I encountered some unexpected behaviour: my new validation rules only seem to get called on fields that are not left blank.

I initially thought my code was doing something stupid (I'm quite new to CodeIgniter) and made a topic in the code and application forums, but no one there could find a problem in my code. So, I was wondering if this might be a bug in the form validation library?

The full topic with my sample code in it can be found here.


Form validation: blank fields bug? - El Forum - 06-14-2010

[eluser]WanWizard[/eluser]
Validation rules are never called on blank fields, unless you define the field as 'required'.