org.barracudamvc.core.forms.validators
Class EmailValidator
java.lang.Object
org.barracudamvc.core.forms.AbstractFormValidator
org.barracudamvc.core.forms.DefaultFormValidator
org.barracudamvc.core.forms.validators.RegularExpressionValidator
org.barracudamvc.core.forms.validators.EmailValidator
- All Implemented Interfaces:
- FormValidator
public class EmailValidator
- extends RegularExpressionValidator
Validator for ensuring a string is a valid email address.
- Since:
- csc_110304_1
- Author:
- christianc@atmreports.com
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PATTERN
public static Pattern PATTERN
EmailValidator
public EmailValidator()
EmailValidator
public EmailValidator(String ierrorMessage)
validateFormElement
public void validateFormElement(Object val,
FormElement element,
boolean deferExceptions)
throws ValidationException
- Description copied from class:
DefaultFormValidator
- Validate a FormElement. This is the method developers should
override to provide specific validation based on the value
and (potentially) information contained in the FormElement.
To indicate an element is invalid, through a ValidationException,
which will interrupt the validation process immediately. If you
want to indicate an error, but would still like validation to
continue (so that you can identify multiple errors in one
validation pass) throw a DeferredValidationException instead.
- Overrides:
validateFormElement
in class RegularExpressionValidator
- Parameters:
val
- the actual value to be validatedelement
- the form element that contains the val
to validate elements by comparing them with other elements)deferExceptions
- do we want to deferValidation exceptions
and attempt to validate all elements so that we can process
all the exceptions at once
- Throws:
ValidationException
- if the element is not valid
Copyright © 2006 BarracudaMVC.org All Rights Reserved.