Support the ongoing development of Laravel.io →
Requests Input Validation
Last updated 2 years ago.
0

If you are submittin the request outside a HTML Form than you have to set your HTTP request headers as follow:

Content-Type: application/json Accept: application/json

In this way, Laravel will give you back the validation errors in json format and HTTP status 422 (Unprocessable Entity)

0

Sign in to participate in this thread!

Eventy

Your banner here too?

Veuge veuge Joined 20 Apr 2016

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.