I have recently upgraded from JSF 1.2 to JSF 2.1. Here is my code:
Product Code: <h:inputText id="productCode" value="#{dataItem.productCode}" maxlength="25" disabled="#{dataItem.disabled}">
<f:validateLength minimum="2" maximum="25" />
</h:inputText>
<h:message for="productCode" errorClass="error" showSummary="false" />
The behavior of the validateLength in JSF 1.2 was if we enter the value "1" in the field Product Code which is less than the mininum allowable '2', I will get the error message "Value is less than allowable minimum of '2'". But if I dont enter any value for the field Product Code then I dont see any error message.
This behavior has changed part of JSF 2.1. If I dont give any value for the field Product Code then I get the error message "Value is less than allowable minimum of '2'".
Did the behavior really change part of JSF 2.1?
Any thoughts or help on this is much appreciated.