public final class VEmail extends FieldValidator
Constructor and Description |
---|
VEmail(AbstractText field,
String errorMessage)
Constructs a new email validator that does not allow empty
email address as valid
|
VEmail(AbstractText field,
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,
javax.servlet.http.HttpServletRequest req)
Works with any field that returns a String via it's
Field#getValue method. |
getErrorMessage, getField
public VEmail(AbstractText field, String errorMessage)
public VEmail(AbstractText field, String errorMessage, boolean allowEmpty)
public boolean validate(FormData fd, javax.servlet.http.HttpServletRequest req)
Field#getValue
method.validate
in class FieldValidator
ClassCastException
- If the field's Field#getValue
method
does not return a String