Skip to content

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