mirror of
https://github.com/zxing/zxing.git
synced 2025-02-02 05:41:08 -08:00
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
This commit is contained in:
parent
d5c6fabfef
commit
58108dfe5e
|
@ -54,7 +54,7 @@ final class Validators {
|
||||||
|
|
||||||
static void validateEmail(String email) throws GeneratorException {
|
static void validateEmail(String email) throws GeneratorException {
|
||||||
//FIXME: we can have a better check for email here.
|
//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.");
|
throw new GeneratorException("Email is not valid.");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue