I have a form request to validate registration data. The application is a mobile API and I would like this class to return formatted JSON in case of a failed validation.
How to resolve this problem?
No need override any function. just add the accept param in header.