Class VEmail
java.lang.Object
fc.web.forms.FieldValidator
fc.web.forms.VEmail
Validates a email address
-
Constructor Summary
ConstructorsConstructorDescriptionVEmail
(AbstractText field, String errorMessage) Constructs a new email validator that does not allow empty email address as validVEmail
(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. -
Method Summary
Methods inherited from class FieldValidator
getErrorMessage, getField
-
Constructor Details
-
VEmail
Constructs a new email validator that does not allow empty email address as valid -
VEmail
Constructs a new email validator that allows an empty email address as valid if the allowEmpty argument is true. This is useful for optional email fields.
-
-
Method Details
-
validate
Works with any field that returns a String via it'sinvalid reference
Field#getValue
- Specified by:
validate
in classFieldValidator
- Throws:
ClassCastException
- If the field'sinvalid reference
Field#getValue
-