Replies: 1 comment
-
Hi, I also ran into this today as well. I have some complex validation rules and want to prevent a user from filling in a field based on the value of some other field. The prohibited rule in the documentation clearly states empty is allowed. My input is empty, which changes to null with the TrimStrings and ConvertEmptyStringsToNull middleware. Thus, I was expecting Prohibit to pass when the filed is not present or is null. This is at minimum a miss-match with the documentation. Thanks. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
on this code the comment say's
framework/src/Illuminate/Validation/Concerns/ValidatesAttributes.php
Lines 1482 to 1493 in b5a70e2
but on the documentation for rule-prohibited it say's
as a developer I expected that the word
OR
inmust be empty or not present
means that I can still submit the form with the prohibited input but it must not have a value....P.S. if this is not a
bug
but rather a documentation change, then please do change the title of this issue, Thank you...Beta Was this translation helpful? Give feedback.
All reactions