org.opentox.toxotis.util.aa
Class EmailValidator

java.lang.Object
  extended by org.opentox.toxotis.util.aa.EmailValidator

public class EmailValidator
extends Object

A Class for validating email addresses according to the RFC syntax rules (RFC 2822 specification) and other syntatical rules that can identify various fake email addresses like john@yahoo.wtf. Two regular expressions are used found at http://code.iamcal.com/php/rfc822/full_regexp.txt and http://www.regular-expressions.info/email.html respectively and a set of valid email extensions was established from http://www.velocityreviews.com/forums/t125158-java-email-validator.html.

Author:
Pantelis Sopasakis, Charalampos Chomenides

Constructor Summary
EmailValidator()
           
 
Method Summary
static boolean validate(String mail)
          Validate an email address
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EmailValidator

public EmailValidator()
Method Detail

validate

public static boolean validate(String mail)
Validate an email address

Parameters:
mail - The email address to be validated
Returns:
true if the e-mail address is RFC compliant and meets the structural requirements imposed by this class.


Copyright © 2011-2012 OpenTox. All Rights Reserved.