Project Documentation

Summary

Tag name: <tr:validateLength>

type: org.apache.myfaces.trinidad.Length

Validate that the value entered is within a given length.

Code Example(s)

<tr:inputText id="mdf3" value="#{bean.value}"
                               label="max length">
  <tr:validateLength maximum="#{bean.maxValue}"/>
</tr:inputText>

Attributes

Name Type Supports EL? Description
disabledbooleanYes Default Value: false

Whether the converter should be disabled, default to false.
maximumintYes the maximum length of the entered value.
messageDetailExactStringYes

The detail error message to be used for constructing faces messages, if input value is not of an acceptable length, when both minimum and maximum are set to the same value.

Parameters:

  • {0} the label that identifies the component
  • {1} value entered by the user
  • {2} the allowed length
messageDetailMaximumStringYes

The detail error message to be used for constructing faces messages, when input value exceeds the maximum length set.

Parameters:

  • {0} the label that identifies the component
  • {1} value entered by the user
  • {2} the maximum allowed length
messageDetailMinimumStringYes

The detail error message to be used for constructing faces messages, when input value is less than the set minimum length.

Parameters:

  • {0} the label that identifies the component
  • {1} value entered by the user
  • {2} the minimum allowed length
messageDetailNotInRangeStringYes

The detail error message to be used for constructing faces messages, if input value is not of an acceptable length, when both minimum and maximum are set.

Parameters:

  • {0} the label that identifies the component
  • {1} value entered by the user
  • {2} the minimum allowed length
  • {3} the maximum allowed length
minimumintYes the minimum length of the entered value.