public final class VEmail extends FieldValidator
Constructor and Description |
---|
VEmail(AbstractText field,
java.lang.String errorMessage)
Constructs a new email validator that does not allow empty
email address as valid
|
VEmail(AbstractText field,
java.lang.String errorMessage,
boolean allowEmpty)
Constructs a new email validator that allows an empty email
address as valid if the allowEmpty argument is
true.
|
Modifier and Type | Method and Description |
---|---|
boolean |
validate(FormData fd,
HttpServletRequest req)
Works with any field that returns a String via it's
Field#getValue method. |
getErrorMessage, getField
public VEmail(AbstractText field, java.lang.String errorMessage)
public VEmail(AbstractText field, java.lang.String errorMessage, boolean allowEmpty)
public boolean validate(FormData fd, HttpServletRequest req)
Field#getValue
method.validate
in class FieldValidator
java.lang.ClassCastException
- If the field's Field#getValue
method
does not return a String