How to customize JSF validation error message

后端 未结 3 1542
小蘑菇
小蘑菇 2020-12-01 21:02

How can I customize the validation message that appears when validation fails?

Here is the code I have:


    

3条回答
  •  广开言路
    2020-12-01 21:15

    The simplest way would be to set the validatorMessage="my custom message" attribute in the tag.

    For a more advanced way read this article Customize validation error message in JSF 2.0

    And here a complete Reference to all available message that you can override in JSF 2.0.x

提交回复
热议问题