|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.cocoon.forms.datatype.validationruleimpl.AbstractValidationRule org.apache.cocoon.forms.datatype.validationruleimpl.EmailValidationRule
public class EmailValidationRule
ValidationRule that checks that a string is an email address.
Based on code copied from org.apache.commons.validator.EmailValidator.
Constructor Summary | |
---|---|
EmailValidationRule()
|
Method Summary | |
---|---|
protected boolean |
isValidDomain(String domain)
Returns true if the domain component of an email address is valid. |
protected boolean |
isValidIpAddress(org.apache.oro.text.perl.Perl5Util ipAddressMatcher)
Validates an IP address. |
protected boolean |
isValidSymbolicDomain(String domain)
Validates a symbolic domain name. |
protected boolean |
isValidUser(String user)
Returns true if the user component of an email address is valid. |
boolean |
supportsType(Class clazz,
boolean arrayType)
Returns true if this ValidationRule supports validating objects of the same class as the one specified. |
ValidationError |
validate(Object value,
org.outerj.expression.ExpressionContext expressionContext)
|
Methods inherited from class org.apache.cocoon.forms.datatype.validationruleimpl.AbstractValidationRule |
---|
evaluateComparable, evaluateNumeric, getFailMessage, hasFailMessage, setFailMessage |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public EmailValidationRule()
Method Detail |
---|
public ValidationError validate(Object value, org.outerj.expression.ExpressionContext expressionContext)
value
- a value of a class supported by the ValidationRule implementationexpressionContext
- many validation rules use the xReporter expression interpreter,
the expressionContext allows to resolve variables used in these expressions.public boolean supportsType(Class clazz, boolean arrayType)
ValidationRule
protected boolean isValidDomain(String domain)
domain
- being validatied.protected boolean isValidUser(String user)
user
- being validatedprotected boolean isValidIpAddress(org.apache.oro.text.perl.Perl5Util ipAddressMatcher)
ipAddressMatcher
- Pattren matcherprotected boolean isValidSymbolicDomain(String domain)
domain
- symbolic domain name
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |