Skip to content

Commit

Permalink
Fix regex
Browse files Browse the repository at this point in the history
  • Loading branch information
joaaogui committed Jun 30, 2020
1 parent 12a6b9c commit be35746
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ public void onPageFinished(WebView view, String url) {
"javascript:(function f() {" +
"var email = document.getElementsByName('identifier');" +
"email[0].oninput = function(value) {" +
"if(!/^\\w+([\\.-]?\\w+)*(@)?((e(d(u)?)?)?|(e(s(t(u(d(a(n(t(e)?)?)?)?)?)?)?)?)?)?(\\.)?(s(e(\\.(d(f(\\.(g(o(v(\\.(b(r)?)?)?)?)?)?)?)?)?)?)?)?$/.test(email[0].value)){" +
"if(!/^\\w?([\\.-]?\\w+)*(@)?((e(d(u)?)?)?|(e(s(t(u(d(a(n(t(e)?)?)?)?)?)?)?)?)?)?(\\.)?(s(e(\\.(d(f(\\.(g(o(v(\\.(b(r)?)?)?)?)?)?)?)?)?)?)?)?$/.test(email[0].value)){" +
"email[0].value = email[0].value.split('@')[0];" +
"alert('São permitidos apenas emails com domínio: @edu.se.df.gov.br ou @estudante.se.df.gov.br ou @se.df.gov.br');" +
"return false;" +
Expand Down

0 comments on commit be35746

Please sign in to comment.