Server side validation messages (when using ajax to send the form)

Sometimes you might want to do some extra validation on the server side, after the form is sent (i.e no client-side validation errors).

If server-side validation fails simply return a string with some invalid code (e.g 400). The response content will be displayed in the status bar.

To display more than one error, return an array similar to this:

    name: 'username',
    message: 'The username field is required'
    name: 'password',
    message: 'The password must contain at least 6 characters'

results matching ""

    No results matching ""