• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
ValidationRules Bug? when required email

#1
Hello developers.

Why do I get an error if I send an empty field but do not use a required option?

Code:
  protected $dynamicRules = [
    'webseite'                => 'required|valid_url',
    'email'                => 'valid_emails'
    ]
  ];

https://codeigniter4.github.io/userguide...tion-array

i wish there was another option: empty_allowed.

Or am I taking this the wrong way?
Reply

#2
Hi!

Add new rule for field:

permit_empty
Reply

#3
hi. thank you very much, that was it exactly Shy
Reply


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


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