It seems that there are no error handling facility in the Jquery.Form plugin, which is very frustrating. Even though the documentation says we can use the $.ajax options, I
For anybody still needing this, this is a way of getting it to work
function submitForm()
{
var isSuccess = false,
options = {
url : "posturl.php",
type : 'POST',
dataType : 'json',
success:function(msg) {
//set the variable to true
isSuccess = true;
//do whatever
},
complete: function () {
if (isSuccess === false) {
//throw the error message
}
}
};
//Ajax submit the form
$('#your_form').ajaxSubmit(options);
// always return false to prevent standard browser submit and page navigation
return false;
}