Locale

Change the locale of the datepicker, schedule and client side validation messages.

Language
English
English
English
French
German
German
German
Italian
Korean
Spanish
Catalan
Dutch
Portuguese
Portuguese
Arabic
Arabic
Bulgarian
Czech
Greek
Persian
Finnish
Danish
Hindi
Indonesian
Croatian
Japanese
Hungarian
Hebrew
Georgian
Central Kurdish
Khmer
Kyrgyz
Kazakh
Lithuanian
Latvian
Malay
Norwegian
Polish
Romanian
Russian
Slovak
Slovenian
Serbian
Serbian
Swedish
Thai
Turkish
Ukrainian
Vietnamese
Chinese
Chinese

Input Style

Themes

PrimeOne
Saga Saga
Vela Vela
Arya Arya
Bootstrap
bootstrap4-blue-light Bootstrap Blue
bootstrap4-purple-light Bootstrap Purple
bootstrap4-blue-dark Bootstrap Blue
bootstrap4-purple-dark Bootstrap Purple
Material Design
material-indigo-light Indigo
material-deeppurple-light' Deep Purple
material-indigo-dark Indigo
material-deeppurple-dark' Deep Purple
Material Design Compact
material-indigo-light Indigo
material-deeppurple-light' Deep Purple
material-indigo-dark Indigo
material-deeppurple-dark' Deep Purple

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="mb-3">
            <p:outputLabel for="@next" value="Given Name: (@Size(min=2,max=5))"/>
            <p:inputText value="#{beanValidationView.name}" label="Given Name"/>
            <p:message for="@previous"/>
            <h:outputText value="#{beanValidationView.name}"/>
            
            <p:outputLabel for="@next" value="Surname: (@NotBlank)"/>
            <p:inputText value="#{beanValidationView.notBlank}" label="Surname" />
            <p:message for="@previous"/>
            <h:outputText value="#{beanValidationView.notBlank}"/>
            
            <p:outputLabel for="@next" value="Address: (@NotEmpty)"/>
            <p:inputText value="#{beanValidationView.notEmpty}" label="Address"/>
            <p:message for="@previous"/>
            <h:outputText value="#{beanValidationView.notEmpty}"/>

            <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="Time (@PastOrPresent)"/>
            <p:inputText value="#{beanValidationView.pastOrPresentDate}">
                <f:convertDateTime pattern="HH:mm:ss"/>
            </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="DateTime (@FutureOrPresent)"/>
            <p:inputText value="#{beanValidationView.futureOrPresent}">
                <f:convertDateTime pattern="MM/dd/yyyy HH:mm:ss"/>
            </p:inputText>
            <p:message for="@previous"/>
            <h:outputText/>
            
            <p:outputLabel for="@next" value="Negative: (@Negative)"/>
            <p:inputText value="#{beanValidationView.negative}" label="Negative"/>
            <p:message for="@previous"/>
            <h:outputText value="#{beanValidationView.negative}"/>
            
            <p:outputLabel for="@next" value="Negative/Zero: (@NegativeOrZero)"/>
            <p:inputText value="#{beanValidationView.negativeOrZero}" label="Negative"/>
            <p:message for="@previous"/>
            <h:outputText value="#{beanValidationView.negativeOrZero}"/>
            
            <p:outputLabel for="@next" value="Positive: (@Positive)"/>
            <p:inputText value="#{beanValidationView.positive}" label="Positive"/>
            <p:message for="@previous"/>
            <h:outputText value="#{beanValidationView.positive}"/>
            
            <p:outputLabel for="@next" value="Positive/Zero: (@PositiveOrZero)"/>
            <p:inputText value="#{beanValidationView.positiveOrZero}" label="Positive"/>
            <p:message for="@previous"/>
            <h:outputText value="#{beanValidationView.positiveOrZero}"/>

            <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="mr-3" />
        <p:commandButton value="Save with disabled CSV" ajax="false" icon="pi pi-check" />
    </h:form>
</div>