Welcome Guest, Not a member yet? Register   Sign In
ValidationRules Bug? when required email
#1

(This post was last modified: 02-29-2020, 02:03 AM by MikiStoni.)

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




Theme © iAndrew 2016 - Forum software by © MyBB