Closed Maks3w closed 9 years ago
@weierophinney I've reopen this because restore the behavior of 2.3.
From 2.3.9 I can upgrade without BC Breaks except for this one and the validator renaming for PHP7 compliance (Int > IsInt)
Workaround (Recommended, rely on allow_empty:false/continue_if_empty:false
is now deprecated):
Before:
array(
'name' => 'password',
'required' => false,
'filters' => array(),
'validators' => array(),
'error_message' => 'This field cannot be empty',
'allow_empty' => true,
'continue_if_empty' => true,
)
After:
array(
'name' => 'password',
'required' => false,
'filters' => array(),
'validators' => array(
0 => array(
'break_chain_on_failure' => true,
'name' => 'Zend\\Validator\\NotEmpty',
'options' => array(),
),
),
'error_message' => 'This field cannot be empty',
'allow_empty' => false,
'continue_if_empty' => false,
)
We can again discard this because the feature to fix is now deprecated and workaround exists
There is no reason for to have differences when required is true or false and the value is always set.