Replies: 1 comment
|
I agree, have gotten bit by that one my self. But got caught in unit testing. |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Hello,
I have a minor suggestion for the Form validation tutorial: make it clear that $v->required('field') is valid even for empty values. I couldn't see it in the tutorial, even the doc for this method does not seem to say that https://docs.mojolicious.org/Mojolicious/Validator/Validation#required
I am only saying that because I lost some time trying to understand why something like $v->required('field')->range(1,10) was sending me errors about the range, with an empty value, rather a 'required' error. I found the answer only reading about the 'not_empty' check https://docs.mojolicious.org/Mojolicious/Validator/#not_empty
All reactions