net.sf.echobinding.validation
Class RegexValidator

java.lang.Object
  extended by net.sf.echobinding.validation.RegexValidator
All Implemented Interfaces:
Validator

public class RegexValidator
extends java.lang.Object
implements Validator

A validator the uses a regular expression to validate user input.


Constructor Summary
RegexValidator(java.lang.String regex)
          Constructs the regular expression validator.
 
Method Summary
 ValidationReport validate(java.lang.Object bean, java.lang.Object input)
          Checks if the input string matches the regular expression.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RegexValidator

public RegexValidator(java.lang.String regex)
Constructs the regular expression validator.

Parameters:
regex - - the regular expression to use
Method Detail

validate

public ValidationReport validate(java.lang.Object bean,
                                 java.lang.Object input)
Checks if the input string matches the regular expression.

Specified by:
validate in interface Validator
Parameters:
input - - the user input


Copyright © 2007. All Rights Reserved.