OverviewSince 4.1 The ace:clientValidateLength component validates the input of the enclosing component by allowing only the text content with its length within the defined limits to be submitted. In the case of ace:checkboxButtons component the length constraints are applied to the number of checked checkboxes. The ace:clientValidateLength component can be used to validate the following:
Getting Started<html ... xmlns:ace="http://www.icefaces.org/icefaces/components"> <h:body> <h:form> ... // Validates that the entered text value has a minimum length of 5 characters. <ace:textEntry id="password" label="Password " labelPosition="left" value="#{clientValidateLength.password}" secret="true"> <ace:clientValidateLength minimum="5" /> </ace:textEntry> ... // Validates that between 2 and 3 checkboxes have been selected/checked. <ace:checkboxButtons id="Selections" header="Choose 2 or 3 letters" value="#{clientValidateLength.selected}" labelPosition="top"> <f:selectItem itemLabel="A" itemValue="One" /> <f:selectItem itemLabel="B" itemValue="Two" /> <f:selectItem itemLabel="C" itemValue="Three" /> <f:selectItem itemLabel="D" itemValue="Four" /> <ace:clientValidateLength minimum="2" maximum="3"/> </ace:checkboxButtons> ... </h:form> ... </h:body> </html> Attributes
minimum required length of the input. maximum allowed length of the input. Validation Behaviour
Event ListenersNo direct event listener is associated with this component. Client Behavior EventsNo direct client behavior is associated with this component. JavaScript APINot applicable. Keyboard and ARIA SupportNot applicable. CSS ClassesNot applicable. Known Issues
Additional ResourcesNone. |
ClientValidateLength
© Copyright 2021 ICEsoft Technologies Canada Corp.