Guardian's avatar

Form Request validation http status codes

Hi All,

I am using FormRequest validation on a lot of my POST based routes. All works fine, but I am wondering how (and if?) I can change the returned http status code from within the validation class?

For example I have a request that validates if 2 properties are filled out (by using the required property). If they are not provided, I get a 422 Unprocessable Entity. I would like to change this to a 400

Anyone ever did this?

0 likes
2 replies
marwil's avatar

I'm opening this thread because on 5.5 response() function is gone, how would i change it now?

2 likes

Please or to participate in this conversation.