New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
5.7.14 -> 5.7.19 FormRequest throws validator error #27073
Comments
Looks like your code is taking advantage of a bug that existed before 5.7.16. |
@devcircus you may be right :D |
The PR that affects your code is probably #26604, is there a reason why you inject a normal |
Hello, the whole app crashed for the same reason! |
Even if BrandStoreRequest was injected instead of normal request the same error gonna show up dunno why! |
The version that "broke" your application is 5.7.16 i suppose, so you should be able to downgrade to 5.7.15 to get your application to work again. Can you show your controller and request so we can have a look at reproducing? |
Routing changes often, part of it is managed by user in panel. |
Didn't tried typical path |
Yes, after downgrade to 5.7.15 everything works fine.
BrandsController:
BrandStoreRequest:
I've made quick fix for myself by adding to BrandStoreRequest:
|
As devcircus already mentioned, you were relying on an existing bug which was that new validation instances were being created again and again. Because you're not injecting the request, the How you can fix this is: |
As others have said above you'll probably need to make a few changes to adopt the new behavior. |
$companyRequest = new CompanyRequest($request->get('company')); Although in CompanyRequest added
|
Description:
After update from 5.7.14 to 5.7.19 all my FormRequest validations throw
error.
After returning to 5.7.14 validation works ok.
Steps To Reproduce:
BrandStoreRequest (extends FormRequest):
BrandsController (extends default created Contreoller):
The text was updated successfully, but these errors were encountered: