Could somebody provide a very simple example of how to display a server side validation message on an alpaca form?
E.g. How do I display the messages if the simple form at http://www.alpacajs.org/demos/bootstrap/simple/simple1.html is submitted with an ajax request and the server returns the following (or similar) validation message:
{
"success":false,
"errors": [
{
"field": "first",
"message": "first name must be unique"
},
{ "field": "last",
"message": "last name must be unique"
}]
}
I read these issues, but unfortunately I couldn't figure out the solution to this.
I finally came up with a simple jQuery DOM manipulation solution:
}