Package org.apache.bval.routines
Class EMailValidationUtils
- java.lang.Object
-
- 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
Fields Modifier and Type Field Description static Pattern
DEFAULT_EMAIL_PATTERN
-
Constructor Summary
Constructors Constructor Description EMailValidationUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description 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 perMatcher.matches()
.
-
-
-
Field Detail
-
DEFAULT_EMAIL_PATTERN
public static final Pattern DEFAULT_EMAIL_PATTERN
-
-
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 perMatcher.matches()
.- Parameters:
value
-aPattern
-- Returns:
true
ifvalue
was aString
matchingaPattern
-
-