I'm looking for solution on how I can display errors that the server respond, this is the respond for every invalid submission so I want to make the error handler in the app level and not in a controller. I want to display the errors both on the FORM level and on the field level.
I have a REST API that in case of error retu the following JSON object:
{
"message": "Validation error: Validation notEmpty failed,nValidation error: Validation isEmail failed",
"errors": [
{
"field": "useame",
"message": "Validation notEmpty failed"
},
{
"field": "email",
"message": "Validation isEmail failed"
}
]
}
How can I create a service that display the errors in case there is any?
Thanks
