$.post('backend.php', form.serialize(), function(data) { if (data.status == 1) { // Everything is fine } else { // There was backend errors. Add them to the form. add_errors_to_form(form, data.errors); } }, 'json');