Validating the mail very effectively, is little difficult. Most of the programers will search for a code for this to make their work easier. Here is a simple code for validating your email in Java. It is using the apache.commons-validator jar and oro-gump-18012007.jar.
// Code email validation
public static boolean validateEmailAddress(String sEmail){
EmailValidator emailValidator = EmailValidator.getInstance();
return emailValidator.isValid(sEmail);
}
We can do the email validation using regx. This is another way of doing it effectively. If this post helped you then please leave one comment here ![]()
Downloads : apache.commons-validator.jar, oro-gump-18012007.jar
Technorati tags: Email validation
I must say I’ve never looked at commons-validator before… I must say: I’ve been missing out! Very cool stuff (typical of most of the commons).
The only problem I’ve had recently with commons was when I downloaded fileupload, only to find that it now has a dependency on io. Meh… I like my API’s to have velocity style “dep” JAR’s that include all the dependencies, so that I don’t have to download them…. I’m lazy
hi
please give me the exact path to download the apache.commons-validator.jar file…. am not able to get the path… please help me immediately…..
Hi
This is the link http://jakarta.apache.org/site/downloads/downloads_commons-validator.cgi
click on the binary zip link 1.3.1.zip there
Hope you got…..
Lijin
Mmmm,ok it’s nice but why i use it while i can use Regular expression in an effcient way
http://essamabdelaziz.wordpress.com
what does RFC standard the validator support, 822 or 2822? Looks it do only old RFC822.
Thank You !!!!
Its Work !!
Nice works fine..
Great job!
Thanks…