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
PHP's filter_var returns filtered data or false if the filter fails. Respect\Validation's FilterVar uses Callback to call filter_var, which in turn casts the result to bool. The result of this is that if valid data from filter_var casts to false, the validator rejects the input even though it passed validation by filter_var.
For example:
filter_var('0', FILTER_VALIDATE_INT); // Valid input, returns 0, a valid integer.
(new FilterVar(FILTER_VALIDATE_INT))->validate('0'); // Valid input, returns false.
The text was updated successfully, but these errors were encountered:
PHP's filter_var returns filtered data or false if the filter fails. Respect\Validation's FilterVar uses Callback to call filter_var, which in turn casts the result to bool. The result of this is that if valid data from filter_var casts to false, the validator rejects the input even though it passed validation by filter_var.
For example:
The text was updated successfully, but these errors were encountered: