Edge case - Validator empy string is a uuid #39829
Answered
by
driesvints
kocoten1992
asked this question in
Q&A
-
Description:$validator = Validator::make(['uuid' => ''], ['uuid' => 'uuid']);
$validator->passes(); // true It is suppose to be |
Beta Was this translation helpful? Give feedback.
Answered by
driesvints
Nov 30, 2021
Replies: 1 comment
-
You're not requiring the value so the result is correct. Try: $validator = Validator::make(['uuid' => ''], ['uuid' => 'required|uuid']); Also, please try Discussions first before posting issues. |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
kocoten1992
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You're not requiring the value so the result is correct. Try:
Also, please try Discussions first before posting issues.