org.apache.bval.routines
Class EMailValidationUtils

java.lang.Object
  extended by org.apache.bval.routines.EMailValidationUtils

public class EMailValidationUtils
extends Object

Description: holds the regexp to validate an email address
User: roman.stumm
Date: 17.06.2010
Time: 10:40:59


Field Summary
static Pattern DEFAULT_EMAIL_PATTERN
           
 
Constructor Summary
EMailValidationUtils()
           
 
Method Summary
static boolean isValid(Object value)
          Learn whether a given object is a valid email address.
static boolean isValid(Object value, Pattern aPattern)
          Learn whether a particular value matches a given pattern per Matcher.matches().
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_EMAIL_PATTERN

public static final Pattern DEFAULT_EMAIL_PATTERN
Constructor Detail

EMailValidationUtils

public EMailValidationUtils()
Method Detail

isValid

public static boolean isValid(Object value)
Learn whether a given object is a valid email address.

Parameters:
value - to check
Returns:
true if the validation passes

isValid

public static boolean isValid(Object value,
                              Pattern aPattern)
Learn whether a particular value matches a given pattern per Matcher.matches().

Parameters:
value -
aPattern -
Returns:
true if value was a String matching aPattern


Copyright © 2010-2014 The Apache Software Foundation. All Rights Reserved.