IBM WebSphere Multichannel Bank Transformation Toolkit Javadoc

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

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

public class MaxLengthValidator
extends Validator

Using this you can specify the maximum length of text input. It can be used in afterValidators and beforeValidators.


Constructor Summary
MaxLengthValidator()
          Default Constructor for MaxLengthValidator
MaxLengthValidator(int length)
          Constructor for MaxLengthValidator with max length attribute
 
Method Summary
 int getMaxLength()
          Get max length for this validator
 void setMaxLength(int maxLength)
          Set max length for this validator
 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

MaxLengthValidator

public MaxLengthValidator()
Default Constructor for MaxLengthValidator


MaxLengthValidator

public MaxLengthValidator(int length)
Constructor for MaxLengthValidator with max length attribute

Parameters:
length - max length
Method Detail

getMaxLength

public int getMaxLength()
Get max length for this validator

Returns:

setMaxLength

public void setMaxLength(int maxLength)
Set max length for this validator

Parameters:
maxLength -

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:

IBM WebSphere Multichannel Bank Transformation Toolkit Javadoc

(c) Copyright IBM Corporation 1998, 2009