Update site-prayer.js
modify email validation regex
This commit is contained in:
parent
1f1751c19b
commit
3675a28791
@ -622,7 +622,9 @@ $(function () {
|
||||
}
|
||||
|
||||
if (email && email.length > 0) {
|
||||
if (!(/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(email))) {
|
||||
if (!(/^[a-zA-Z0-9.!#$%&’*+/=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:\.[a-zA-Z0-9-]+)*$/.test(email))) {
|
||||
// old regex /^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/
|
||||
// updated to default html5 regex
|
||||
alert("You have entered an invalid email address. Please, check and try again.");
|
||||
return (false);
|
||||
}
|
||||
|
Reference in New Issue
Block a user