Class RequiredFieldValidator
- java.lang.Object
-
- org.sourceid.saml20.adapter.gui.validation.impl.RequiredFieldValidator
-
- All Implemented Interfaces:
Serializable,FieldValidator
public class RequiredFieldValidator extends Object implements FieldValidator, Serializable
A FieldValidator that enforces that a GUI field has a value (a required field).- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description RequiredFieldValidator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidvalidate(Field field)If the value of the field is not null and not empty, this method returns silently.-
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.sourceid.saml20.adapter.gui.validation.FieldValidator
isExternalValidator
-
-
-
-
Method Detail
-
validate
public void validate(Field field) throws ValidationException
If the value of the field is not null and not empty, this method returns silently. Otherwise, it throws a ValidationException with an error message saying that the named field is required.- Specified by:
validatein interfaceFieldValidator- Parameters:
field- the Field to validate.- Throws:
ValidationException- if the field value is null or empty (white space only).
-
-