Friday, May 23, 2008

Email validations


private boolean isEmailBad(String email)
{
String emailChars = "@.";
if (email.indexOf(emailChars) == 1){
log.warn("Email address does not contains @ and . charachters");
}
if (email == null || email.length() < 5)
{
log.warn("Invalid email address length");
return true;
}
return false;
}