tags:

views:

118

answers:

1

I have a input field with validation to validate the max and min length

<h:inputText id="LABEL_ID" styleClass="textboxsmall" value="#{sampleDatatableBean.accessionLabelId}" maxlength="5">
    <f:validateLength minimum="4" maximum="5" />
</h:inputText>
<br/><h:message id="LABEL_ID_MSG" styleClass="errorMessage" for="LABEL_ID" />

It validates but I get the below message:

"Value is less than allowable minimum of {0}"

Shouldn't {0} be replaced by value from minimum? Not sure why its not picking up the value. Any ideas?

Version info:
myfaces-api-1.1.5.jar:
Manifest-Version: 1.0 
Archiver-Version: Plexus Archiver 
Created-By: Apache Maven 
Built-By: mrmaven 
Build-Jdk: 1.5.0_11 
Implementation-Title: API 
Implementation-Version: 1.1.6-SNAPSHOT 
Implementation-Vendor-Id: org.apache.myfaces.core 
Implementation-Vendor: Apache Software Foundation 

myfaces-impl-1.1.5.jar:
Manifest-Version: 1.0
Archiver-Version: Plexus Archiver
Created-By: Apache Maven
Built-By: mrmaven
Build-Jdk: 1.5.0_11
Implementation-Title: Impl
Implementation-Version: 1.1.6-SNAPSHOT
Implementation-Vendor-Id: org.apache.myfaces.core
Implementation-Vendor: Apache Software Foundation

AppServer:jboss-4.0.5.GA

Works for

<f:validateLongRange   minimum="100"   maximum="999" />

FIXED Seems to work after adding the _detail in the ErrorMessages_en.properties file.

javax.faces.validator.LengthValidator.MAXIMUM_detail = Value is longer than allowable 
maximum of {0} characters.
A: 

FIXED Seems to work after adding the "javax.faces.validator.LengthValidator.MAXIMUM_detail" in the ErrorMessages_en.properties file.

Sai