Welcome Guest, Not a member yet? Register   Sign In
Null Values in Validations
#1

Hi! I have noticed that some rules like in_list, numeric, integer, doesn't accept NULL or empty values because it throws an error (I think CI3 accepts them). That makes the value to be required always, I think it shouldn't be like that because for that purpose already exist the required rule, is it supposed to work this way? what can I do to change that behavior?
Thanks!
Reply
#2

Try the rule ‘permit_empty’.
http://codeigniter.com/user_guide/librar...able-rules
CodeIgniter 4 tutorials (EN/FR) - https://includebeer.com
/*** NO support in private message - Use the forum! ***/
Reply
#3

(12-18-2020, 04:56 AM)includebeer Wrote: Try the rule ‘permit_empty’.
http://codeigniter.com/user_guide/librar...able-rules

Oh! thank you, I didn't see that rule, maybe I'm blind.  Big Grin
Reply




Theme © iAndrew 2016 - Forum software by © MyBB