Regex ignores whitespaces now and added all fallback pages

This commit is contained in:
2020-12-11 23:53:42 +01:00
parent 3cd8670cef
commit b32cc63e76
6 changed files with 37 additions and 5 deletions

View File

@@ -18,7 +18,7 @@
function test() {
let input_field = document.getElementById("email_input");
let input = input_field.value;
if (!input.match("[a-z]+\\.[a-z]+@adolfinum+\\.de$")) {
if (!input.trim().match("[a-z]+\\.[a-z]+@adolfinum+\\.de$")) {
input_field.value = "";
alert("Die Email-Adresse \"" + input + "\" entspricht nicht den Vorgaben");
}