Validation failing on empty fields even when not required |
I keep my validation rules in App/Config/Validation
I have one of my rules set as: PHP Code: 'topic' => [ When the 'topic' field is let blank it fails validation despite 'required' not being set as a rule. If I remove the validation rule completely then the validation passes as it should, but this means that there is no validation on the field. The same behaviour exists on all my fields. I thought fields were not required by default (otherwise, why would we need the 'required' rule). I would really appreciate any explanation or suggestion. |
Messages In This Thread |
Validation failing on empty fields even when not required - by motownphilippe - 02-19-2021, 06:45 PM
RE: Validation failing on empty fields even when not required - by motownphilippe - 02-19-2021, 07:09 PM
RE: Validation failing on empty fields even when not required - by kenjis - 02-19-2021, 09:42 PM
|