I'm creating a Laravel 7 application.
I have created a POST API that accepts 2 parameters and added validation on them. When validator fails, it gives response "422 unprocessable entity" and gives an error in JSON format like this :
{
"message": "The given data was invalid.",
"errors": {
"mobile_no": [
"The mobile no must be 10 digits."
]
}
}
Now I want the same response with error code 200 instead of 422.
How should I achieve this?