Code:
$.extend($.fn.validatebox.defaults.rules, {
dni: {
validator: function(value, param){
$.ajax({
type: "POST",
url: 'php/validation.php',
data: {dni: value},
success: function(data){
if (data == '1')
{
return true
}
else
{
return false
}
}
});
},
message: 'DNI incorrecto'
}
});This return 1 or 0, and If is working as intended, but cannot show error message. Where I can return validation as true or false?
Thanks again.





