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?
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"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With