You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to use the built-in Date validator in 4.1.2, and it seems to be ignoring the "allowEmpty" option.
Something analogous to this still generates an error when payment_2_date is NULL;
$Validator->add(
[
'payment_1_date',
'payment_2_date'
],
newDate([
'format'=>[
'payment_1_date'=>'Y-m-d',
'payment_2_date'=>'Y-m-d H:i:s'
]
'message'=>[
'payment_1_date'=>'Payment 1 date is not valid',
'payment_2_date'=>'Payment 2 date is not valid'
]
'allowEmpty'=>[
'payment_1_date'=>FALSE,
'payment_2_date'=>TRUE
]
])
);
Looking at the Zephir source for the Date validator, it has allowEmpty() as an option in the comments for __construct(), but doesn't act on it anywhere. I also checked the Alnum and Alpha validators - same deal.
I know comments in Zephir source code aren't considered "public documentation", but there's been a mistake somewhere - either in copy-pasting the comments, or omitting this necessary functionality.
The text was updated successfully, but these errors were encountered:
I'm trying to use the built-in Date validator in 4.1.2, and it seems to be ignoring the "allowEmpty" option.
Something analogous to this still generates an error when
payment_2_date
is NULL;Looking at the Zephir source for the Date validator, it has
allowEmpty()
as an option in the comments for__construct()
, but doesn't act on it anywhere. I also checked theAlnum
andAlpha
validators - same deal.I know comments in Zephir source code aren't considered "public documentation", but there's been a mistake somewhere - either in copy-pasting the comments, or omitting this necessary functionality.
The text was updated successfully, but these errors were encountered: