toolbox.web.validation
Class RSAIdentityNumberField

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

public class RSAIdentityNumberField
extends RegexField

Field implementation to validate RSA Identity Number fields.

The algorithm used is sourced from code written by Rob Otto.

This implementation supports three validation properties:

Specify the following defaults to ensure correct behaviour:


Constructor Summary
RSAIdentityNumberField()
          Defualt constructor
 
Method Summary
 java.lang.Object validate(java.lang.String value, java.util.ResourceBundle bundle)
          Validate the given String.
 
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

RSAIdentityNumberField

public RSAIdentityNumberField()
Defualt constructor

Method Detail

validate

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

Specified by:
validate in interface Field
Overrides:
validate in class RegexField
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.