IBM WebSphere Multichannel Bank Transformation Toolkit Javadoc

com.ibm.btt.rcp.xui.validator
Class RegexValidator

java.lang.Object
  extended by com.ibm.btt.rcp.xui.validator.Validator
      extended by com.ibm.btt.rcp.xui.validator.RegexValidator
All Implemented Interfaces:
IValidator

public class RegexValidator
extends Validator

The input must match the regex which is specified by the regex property. It's usually used in afterValidators.


Constructor Summary
RegexValidator()
          Default Constructor for RegexValidator
RegexValidator(java.lang.String regex)
          Constructor for RegexValidator with regex length attribute
 
Method Summary
 java.lang.String getRegex()
          Get regex property
 void setRegex(java.lang.String regex)
          Set regex property
 java.lang.String validate(IXUIWidget source, java.lang.String text)
          Validate input text if this text is valid.
 
Methods inherited from class com.ibm.btt.rcp.xui.validator.Validator
getErrorMessage, setErrorMessage
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RegexValidator

public RegexValidator()
Default Constructor for RegexValidator


RegexValidator

public RegexValidator(java.lang.String regex)
Constructor for RegexValidator with regex length attribute

Parameters:
regex - regex which to match
Method Detail

validate

public java.lang.String validate(IXUIWidget source,
                                 java.lang.String text)
Description copied from interface: IValidator
Validate input text if this text is valid. Return error message, return null means no validate error

Returns:

getRegex

public java.lang.String getRegex()
Get regex property

Returns:

setRegex

public void setRegex(java.lang.String regex)
Set regex property

Parameters:
regex -

IBM WebSphere Multichannel Bank Transformation Toolkit Javadoc

(c) Copyright IBM Corporation 1998, 2010