Input Style

Free Themes

Built-in component themes created by the PrimeFaces Theme Designer.

Saga Saga
Vela Vela
Arya Arya

Legacy Free Themes

Luna Amber Luna Amber
Luna Blue Luna Blue
Luna Green Luna Green
Luna Pink Luna Pink
Nova Nova
Nova Nova Alt
Nova Nova Accent

PREMIUM TEMPLATES

Create awesome applications in no time using the premium templates and impress your users.

Client Side Validation Bean

Client Side Validation Framework is integrated with Bean Validation Specification.


<div class="card">
    <h:form>
        <p:messages/>

        <h:panelGrid columns="4" cellpadding="7" styleClass="p-mb-3">
            <p:outputLabel for="@next" value="Name: (@Size(min=2,max=5))"/>
            <p:inputText value="#{beanValidationView.name}" label="Name"/>
            <p:message for="@previous"/>
            <h:outputText value="#{beanValidationView.name}"/>

            <p:outputLabel for="@next" value="Age: (@Min(10) @Max(20))"/>
            <p:inputText value="#{beanValidationView.age}" label="Age"/>
            <p:message for="@previous"/>
            <h:outputText value="#{beanValidationView.age}"/>

            <p:outputLabel for="@next" value="Amount: (@DecimalMax('99.9'))"/>
            <p:inputText value="#{beanValidationView.amount}" label="Amount"/>
            <p:message for="@previous"/>
            <h:outputText value="#{beanValidationView.amount}"/>

            <p:outputLabel for="@next" value="Amount: (@Digits(integer=3,fraction=2))"/>
            <p:inputText value="#{beanValidationView.amount2}" label="Amount 2"/>
            <p:message for="@previous"/>
            <h:outputText value="#{beanValidationView.amount2}"/>

            <p:outputLabel for="@next" value="Pattern: (@Pattern(regexp='^[-+]?\\d+$'))"/>
            <p:inputText value="#{beanValidationView.pattern}" label="pattern"/>
            <p:message for="@previous"/>
            <h:outputText value="#{beanValidationView.pattern}"/>

            <p:outputLabel for="@next" value="Assert: (@AssertTrue)"/>
            <p:selectBooleanCheckbox value="#{beanValidationView.checked}"/>
            <p:message for="@previous"/>
            <h:outputText/>

            <p:outputLabel for="@next" value="Date (@Past)"/>
            <p:inputText value="#{beanValidationView.pastDate}">
                <f:convertDateTime pattern="MM/dd/yyyy"/>
            </p:inputText>
            <p:message for="@previous"/>
            <h:outputText/>

            <p:outputLabel for="@next" value="Date (@Future)"/>
            <p:inputText value="#{beanValidationView.futureDate}">
                <f:convertDateTime pattern="MM/dd/yyyy"/>
            </p:inputText>
            <p:message for="@previous"/>
            <h:outputText/>

            <p:outputLabel for="@next" value="Radio Input"/>
            <p:selectOneRadio value="#{beanValidationView.bool}">
                <f:selectItem itemValue="#{true}" itemLabel="True"/>
                <f:selectItem itemValue="#{false}" itemLabel="False"/>
            </p:selectOneRadio>
            <p:message for="@previous"/>
            <h:outputText/>

        </h:panelGrid>

        <p:commandButton value="Save" ajax="false" icon="pi pi-check" validateClient="true" styleClass="p-mr-3" />
        <p:commandButton value="Save with disabled CSV" ajax="false" icon="pi pi-check" />
    </h:form>
</div>