Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

@Email annotation validating correct email format

 
udaya krishna
Ranch Hand
Posts: 65
Firefox Browser Java Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I am using @Email annotation in my entity to store an email address.When I enter an email address in the following format it is displaying "Invalid Email Format" eventhough the format is correct:

ABC-GRP-SPE-Test-DL @ap.mydomain.com

Any idea how to fix it? or I have no other way other than built in validation

Thanks
Udaya Krishna.A
 
Maneesh Godbole
Saloon Keeper
Posts: 11096
13
Android Eclipse IDE Google Web Toolkit Java Mac Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
udaya krishna wrote:
I am using @Email annotation in my entity to store an email address.When I enter an email address in the following format it is displaying "Invalid Email Format" eventhough the format is correct:
ABC-GRP-SPE-Test-DL @ap.mydomain.com

Is that a correct working mail ID? (With the whitespace between the DL and @) If you attempt to send a mail to that id as is (with the white space) is the mail received?
 
udaya krishna
Ranch Hand
Posts: 65
Firefox Browser Java Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
Thanks for the quick response.Actually it is a group id which contains a list of email ids.But thank you.That was such a silly mistake while pasting.I guess i was thrown off by the weird format.Its working fine now after removing the space.

Thanks alot
 
Maneesh Godbole
Saloon Keeper
Posts: 11096
13
Android Eclipse IDE Google Web Toolkit Java Mac Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You are welcome
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic