Closed
Description
This is a (multiple allowed):
- bug
- enhancement
- feature-discussion (RFC)
- CakePHP Version: 3.2
What you did
I need to have my custom validation rules determine whether or not a field should be required or not. This is currently impossible as:
- if you set
allowEmpty
the custom validation rule will not fire if the field is left empty - if you set your custom validation rule, the field is forced to be required before the custom validation rules will trigger.
Expected Behavior
When I create a custom validation rule, it should run it's logic and return true/false whether or not the field is left empty or not.
Actual Behavior
When a custom validation rule is in place, a field cannot be left blank and forces data before the custom validation rules execute.
See http://stackoverflow.com/questions/37176984/cakephp-3-x-custom-validation-field-required