Use Validator in the API to verify the form. if any item passes the verification, {code...} is returned ...} unable to return specific information that has not passed verification; when the front-end or mobile terminal receives the returned error message, it cannot tell the user which does not meet the requirements; I... use Validator in the API to verify the form;
When there are items that pass the verification;
All are returned
{"Message": "The given data failed to pass validation.", "status_code": 500}
Unable to return specific information that has not passed verification;
When the front-end or mobile end receives the returned error message;
It cannot tell the user which does not meet the requirements;
I want something like this;
{"Message": "The email address has been registered", "status_code": 500} {"message": "The password must be 6-16 characters", "status_code": 500}
Ask your friends. what do you need?
When we use laravel to write interfaces;
How are the submitted form fields verified? How do I return the verification result?