From 58108dfe5e654da02abb9fc0b15a10d5a698ff8d Mon Sep 17 00:00:00 2001 From: Sean Owen Date: Mon, 7 Dec 2015 22:17:04 +0000 Subject: [PATCH] Closes issue #517 : crude email validator in encoder web app should not restrict last domain element to 6 chars. "foo@bar.marketing" should be fine --- .../java/com/google/zxing/web/generator/client/Validators.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zxing.appspot.com/src/main/java/com/google/zxing/web/generator/client/Validators.java b/zxing.appspot.com/src/main/java/com/google/zxing/web/generator/client/Validators.java index 80fd14f2f..52ce9d2fe 100644 --- a/zxing.appspot.com/src/main/java/com/google/zxing/web/generator/client/Validators.java +++ b/zxing.appspot.com/src/main/java/com/google/zxing/web/generator/client/Validators.java @@ -54,7 +54,7 @@ final class Validators { static void validateEmail(String email) throws GeneratorException { //FIXME: we can have a better check for email here. - if (!email.matches("^[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\\.[A-Za-z]{2,6}$")) { + if (!email.matches("^[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\\.[A-Za-z]{2,}$")) { throw new GeneratorException("Email is not valid."); } }