Skip to content

Commit

Permalink
Merge branch 'rkrutak/STR-1507/mail_valid_fix' into 'main'
Browse files Browse the repository at this point in the history
fix(registrar): allow for uppercase in top level domain of email

Closes STR-1507

See merge request perun/perun-idm/perun-wui!291
  • Loading branch information
kofzera committed Nov 12, 2024
2 parents 1fe4768 + 70ac796 commit 0a45826
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -1327,7 +1327,7 @@ public native static boolean isValidEmail(String email) /*-{
//var reg1 = /(@.*@)|(\.\.)|(@\.)|(\.@)|(^\.)/; // not valid
//var reg2 = /^.+\@(\[?)[a-zA-Z0-9\-\.]+\.([a-zA-Z]{2,3}|[0-9]{1,3})(\]?)$/; // valid
//return !reg1.test(email) && reg2.test(email);
var reg4 = /^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-z]{2,}$/;
var reg4 = /^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/;
return reg4.test(email);
}-*/;

Expand Down

0 comments on commit 0a45826

Please sign in to comment.