org.sourceid.saml20.adapter.gui.validation.impl
Class RequiredFieldValidator

java.lang.Object
  extended by org.sourceid.saml20.adapter.gui.validation.impl.RequiredFieldValidator
All Implemented Interfaces:
java.io.Serializable, FieldValidator

public class RequiredFieldValidator
extends java.lang.Object
implements FieldValidator, java.io.Serializable

A FieldValidator that enforces that a GUI field has a value (a required field).

Author:
Brian Campbell
See Also:
Serialized Form

Constructor Summary
RequiredFieldValidator()
           
 
Method Summary
 void validate(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
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RequiredFieldValidator

public RequiredFieldValidator()
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:
validate in interface FieldValidator
Parameters:
field - the Field to validate.
Throws:
ValidationException - if the field value is null or empty (white space only).


Copyright 2007 Ping Identity Corp. All rights reserved.