Primefaces - Do not display message for required fields, just hightlight border

13,586

You can set <p:messages globalOnly="true"/>, this will just show global messages, which are not attached to any particular field. Also you can user Primefaces' <p:outputLabel/> for label of input elements, it will add error css to input elements.

You should also update form when you do submit. For example if you do that with command button add update="form_id"

Share:
13,586
CountD
Author by

CountD

Updated on June 20, 2022

Comments

  • CountD
    CountD almost 2 years

    I have a Primefaces 3-field form and a <p:messages> tag to show some server-side validation messages. But I don't want to display the client-side messages related to the required="true" option, just highlight the input field with red.

    Is there a way to do it with Primefaces?