org.mod4j.runtime.validation
Class RegExpValidator

java.lang.Object
  extended by org.mod4j.runtime.validation.RegExpValidator
All Implemented Interfaces:
org.springframework.validation.Validator

public class RegExpValidator
extends java.lang.Object
implements org.springframework.validation.Validator

Author:
Johan Vogelzang

Constructor Summary
RegExpValidator(java.lang.Class clazz, java.lang.String field, java.lang.String regExp)
          Validator for regular expressions
 
Method Summary
 boolean supports(java.lang.Class clazz)
          
 void validate(java.lang.Object target, org.springframework.validation.Errors errors)
          
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RegExpValidator

public RegExpValidator(java.lang.Class clazz,
                       java.lang.String field,
                       java.lang.String regExp)
Validator for regular expressions

Parameters:
clazz - The class that supports validation of regular expressions
field - The field to validate
regExp - The regular expression which the the field must apply to
Method Detail

supports

public boolean supports(java.lang.Class clazz)

Specified by:
supports in interface org.springframework.validation.Validator

validate

public void validate(java.lang.Object target,
                     org.springframework.validation.Errors errors)

Specified by:
validate in interface org.springframework.validation.Validator


Copyright © 2009. All Rights Reserved.