Open alihabbash opened 5 years ago
@alihabbash same is here. I'm using version 2.0.3
, also @Email
does accept inputs like test@.com
.
As a workaround we could use @Pattern
public static final String EMAIL_ADDRESS_PATTERN = "[a-zA-Z0-9\\+\\.\\_\\%\\-\\+]{1,256}\\@[a-zA-Z0-9][a-zA-Z0-9\\-]{0,64}(\\.[a-zA-Z0-9][a-zA-Z0-9\\-]{0,25})+";
@Pattern(regex = EMAIL_ADDRESS_PATTERN)
TextInputEditText email;
The email address pattern was take from here.
I have applied the email annotation to a TextInputlayout after register a ViewDataAdapter but the email validator is accepting emails with scheme like
some@exa
(Without the .com .org ...etc).