validateLength « validation « JSF Q&A

1. JSF validateLength question

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" />
<br/><h:message id="LABEL_ID_MSG" styleClass="errorMessage" for="LABEL_ID" />
It validates but ...

2. Add error message for tag customised for a field

I have many fields on witch I have to validate length. It's not a problem with <f:validateLength> tag. I can also add custom message for this validator. The problem is the ...