toolbox.web.validation
Class DateField

Package class diagram package DateField
java.lang.Object
  extended by toolbox.web.validation.AbstractField
      extended by toolbox.web.validation.StringField
          extended by toolbox.web.validation.DateField
All Implemented Interfaces:
Field

public class DateField
extends StringField

Field implementation to validate Date inputs.

This implementation supports one validation property:


Constructor Summary
DateField()
          Defualt constructor
 
Method Summary
 java.lang.Object validate(java.lang.String value, java.util.ResourceBundle bundle)
          Validate the given String as a date.
 
Methods inherited from class toolbox.web.validation.AbstractField
getDefault, getName, getPattern, getProperties, getProperty, getResourceKey, getResourceString, getResourceString, isRequired, setDefault, setName, setPattern, setProperties, setRequired, setResourceKey, validateRequired
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DateField

public DateField()
Defualt constructor

Method Detail

validate

public java.lang.Object validate(java.lang.String value,
                                 java.util.ResourceBundle bundle)
                          throws ValidationException
Validate the given String as a date.

Specified by:
validate in interface Field
Overrides:
validate in class StringField
Parameters:
value - String value to validate.
bundle - ResourceBundle to use for localised messages.
Returns:
Object containing the result of the validation.
Throws:
ValidationException - if the String does not contain a valid value.