Validation rule "integer" behaviour with "(bool) true" #36218
-
Edit: Moving this into an issue. Currently the validation rule integer passes if the given input is Should the filter_var(true, FILTER_VALIDATE_INT); // 1
// Therefore...
$v = Validator::make(
['input' => true],
['input' => 'required|integer']
);
$v->passes(); // true
$v->validated(); // ['input' => true] Using this data for any DB interaction (or anything) where a Currently I'm avoiding using the rule in favor of |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Solved: #36321 (comment) |
Beta Was this translation helpful? Give feedback.
Solved: #36321 (comment)