Skip to content

[5.4] Allow FormRequest having new Middleware's affected parameters on vali… #17753

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

Closed
wants to merge 1 commit into from

Conversation

paulvl
Copy link

@paulvl paulvl commented Feb 3, 2017

Because for some reason FormRequest seems not to be affected by the new TrimStrings and ConvertEmptyStringsToNull middlewares, all() function need to merge self request before getting all parameters to have trimmed and nulled parameters on validation.

@taylorotwell
Copy link
Member

taylorotwell commented Feb 3, 2017

The middleware work fine for me on form requests. I am unable to recreate the bug.

@tillkruss tillkruss changed the title Allow FormRequest having new Middleware's affected parameters on vali… [5.4] Allow FormRequest having new Middleware's affected parameters on vali… Feb 3, 2017
@themsaid
Copy link
Member

themsaid commented Feb 3, 2017

It works fine for me as well, unable to recreate.

@paulvl
Copy link
Author

paulvl commented Feb 3, 2017

Ok I found the error, FormRequest are unaffected by middlewares when is a json request. I was testing using axios + vue and parameters seems not the be affected by middlewares, common requests are fine as you say.

@taylorotwell
Copy link
Member

Fixed by patch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants