• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Validating Nullable Fields

#1
Right now CI4 validation rules fail if the field is empty. So that they only work properly when the field is required. There should be a "nullable" rule to fix this problem. (I believe Laravel does this)

Otherwise null values should not fail validation by default.

See this post https://forum.codeigniter.com/thread-685...#pid352959
Simpler is always better
Reply

#2
We have the "permit_empty" rule. I think this is what you are looking for.

https://bcit-ci.github.io/CodeIgniter4/l...able-rules
Reply

#3
Yes! Missed it.
Simpler is always better
Reply


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


Users browsing this thread:
1 Guest(s)


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2018 MyBB Group.