Name

LengthValidator

Synopsis

An instance of this class is used as a Validator for the length of a String value.

Synopsis

Class name:

javax.faces.validator.LengthValidator

Extends:

None

Implements:

javax.faces.convert.Validator, javax.faces.component.StateHolder

Fields

public static final String MAXIMUM_MESSAGE_ID

The message identifier for the message this validator creates if the maximum length limit is exceeded: javax.faces.validator.LengthValidator.MAXIMUM.

public static final String MINIMUM_MESSAGE_ID

The message identifier for the message this validator creates if the minimum length limit is not reached: javax.faces.validator.LengthValidator.MINIMUM.

public static final String VALIDATOR_ID

The identifier for this validator: javax.faces.Length.

Constructors

public LengthValidator()

Creates an instance.

public LengthValidator(int maximum)

Creates an instance with the specified maximum.

public LengthValidator(int maximum, int minimum)

Creates an instance with the specified maximum and minimum.

Methods

public boolean equals(Object other)

Returns true if the other object represents the same converter as this instance.

public long getMaximum()

Returns the upper limit set or zero if not defined.

public long getMinimum()

Returns the lower limit set or zero if not defined.

public boolean isTransient()

Returns true if no state should be saved and restored for this instance.

public void restoreState(javax.faces.context.FacesContext context, Object state)

Restores the state for this ...

Get JavaServer Faces now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.