Hello,
actually
myemail@myemail is a valid email according to the specification:
http://www.ietf.org/rfc/rfc0822.txt?number=822.
To be honest, I was surprised too, but in several organisations this format is used for internal emails.
In case you'd like to have some fun with a regular expression, be warned:
http://www.ex-parrot.com/pdw/Mail-RFC822-Address.htmlIf you really want to make sure there's a final prefix, couple @Email with a @Pattern, but be aware that you're going to refuse valid emails.
Also I liked very much what is said
here:
Quote:
Don't go overboard in trying to eliminate invalid email addresses with your regular expression. If you have to accept .museum domains, allowing any 6-letter top level domain is often better than spelling out a list of all current domains. The reason is that you don't really know whether an address is valid until you try to send an email to it. And even that might not be enough. Even if the email arrives in a mailbox, that doesn't mean somebody still reads that mailbox.
As a final note, this is the hibernate core forum area, comments about the validator should be posted
here