I'm using the @Email
annotation to validate an e-mail address.
The issue I'm having is that it's accepting things like ask@stackoverflow
as a valid e-mail address.
I guess this is because they want to support intranet addresses, but I can't seem to find a flag so it does check for an extension.
Do I really need to switch to @Pattern
(and any recommendations for an e-mail pattern that's flexible) or am I missing something?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…