Open zmon opened 5 years ago
When a form fails validation on the server, the API should return errors that will be displayed on the UI.
An example of the return
URL . POST /client Status code: 422 Unprocessable Entity Payload:
active: 0 name: "" _token: "zEwcjrMwbfbK33duxu7GlhL27oUArCpONL0GqLSZ"
Response:
{ "message":"The given data was invalid.", "errors":{ "name":[ "The name field is required." ] } }
NOTE: the name is an array allowing for more than one error message to be returned.
name
When a form fails validation on the server, the API should return errors that will be displayed on the UI.
An example of the return
URL . POST /client Status code: 422 Unprocessable Entity Payload:
Response:
NOTE: the
name
is an array allowing for more than one error message to be returned.