Laravel Validation Rule Required_Without #38776
Replies: 3 comments
-
It works as intended: https://github.com/Jubeki/laravel-bug-report-38775 Maybe this has something todo with your rule notation or another problem in your app. |
Beta Was this translation helpful? Give feedback.
-
I have replicated your test and see that this validation works for status present in the validation rules. If status not present in validation rule it fails, if present it passes. But what I was really talking about is status present on the HTTP Request. If the status is present in the HTTP request, it fails Thanks |
Beta Was this translation helpful? Give feedback.
-
I figured out what the problem was for POST request. It fails when you leave a space between like I did above with For PUT request, it fails totally! @Jubeki please look at this again |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Description:
I am trying to use Laravel Validation Rule Required_without
https://laravel.com/docs/8.x/validation#rule-required-without
however on testing the request, I get

according to laravel docs

so since status is present in my request, the qty field should not be required.
even if I end up removing the status request, same validation error.
Beta Was this translation helpful? Give feedback.
All reactions