You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// if email is invalid
function validation_error(error_message) {
$('#status').html(error_message);
}
$('#status').html(error_message); does not fire.
The "Address is invalid." check and error message does work properly, but it is fired inside validation_success function as the last remaining "else" condition.
You can easily test this by removing $('#status').html(error_message); and testing validator. You'll see it still works just fine. This is a problem because if we want to do something else when email is invalid, let's say addClass it does not work.
The text was updated successfully, but these errors were encountered:
If the ajax call fails, you expect the validation error to run.
If the ajax call succeeds, you expect the validation success to run. The result of the validation might be that the email address appears to be invalid, but this is still a "success" as far as the validator is concerned.
It looks like there's a bug with how error validation_error function works.
https://github.com/mailgun/validator-demo/blob/master/index.html#L88
$('#status').html(error_message);
does not fire.The "Address is invalid." check and error message does work properly, but it is fired inside validation_success function as the last remaining "else" condition.
You can easily test this by removing
$('#status').html(error_message);
and testing validator. You'll see it still works just fine. This is a problem because if we want to do something else when email is invalid, let's say addClass it does not work.The text was updated successfully, but these errors were encountered: