Changed regex to basic email regex

This commit is contained in:
2021-02-13 17:49:50 +01:00
parent 5b3b5b35e5
commit 9b4bfec933
2 changed files with 3 additions and 11 deletions
+1 -1
View File
@@ -18,7 +18,7 @@
function test() {
let input_field = document.getElementById("email_input");
let input = input_field.value;
if (!input.trim().match("[a-z]+\\.[a-z]+@adolfinum+\\.de$")) {
if (!input.trim().match("[^@ \t\r\n]+@[^@ \t\r\n]+\.[^@ \t\r\n]+")) {
input_field.value = "";
alert("Die Email-Adresse \"" + input + "\" entspricht nicht den Vorgaben");
}