Parent Project
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
disabled boolean Yes Default Value: false

Whether the converter should be disabled, default to false.
maximum int Yes the maximum length of the entered value.
messageDetailExact String Yes

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
messageDetailMaximum String Yes

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
messageDetailMinimum String Yes

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
messageDetailNotInRange String Yes

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
minimum int Yes the minimum length of the entered value.