Skip to content

Commit 409f631

Browse files
author
Siddhant
committed
customized email validation
1 parent 55aa903 commit 409f631

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

jquery.validateWrapper.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@
174174
str3 = str2.substr(0, str2.indexOf('.'));
175175
if (str3.lastIndexOf('-') == (str3.length - 1) || (str3.indexOf('-') != str3.lastIndexOf('-')))
176176
return false;
177-
regex = /(^[a-zA-Z0-9]+[._-]{0,1})+([a-zA-Z0-9]+[_]{0,1})*@([a-zA-Z0-9]+[-]{0,1})+(.[a-zA-Z0-9]+)*(\.[a-zA-Z]{2,})$/;
177+
regex = /(^[a-zA-Z0-9]+[._-]{0,1})+([a-zA-Z0-9]+[_]{0,1})*?[a-zA-Z0-9]@([a-zA-Z0-9]+[-]{0,1})+(.[a-zA-Z0-9]+)*(\.[a-zA-Z]{2,})$/;
178178
return regex.test(value);
179179
});
180180

0 commit comments

Comments
 (0)