1

In this example

<h:inputSecret value="#{contact.password}">
            <f:validator validatorId="passwordValidator"/>
            <f:validateLength minimum="8"/>
</h:inputSecret><br/>

If i put a password shorter than 8 letters i have j_idt10: Validation Error: Length is less than allowable minimum of '8' which is exactly what i want but i would like to rewrite the error message. I can do it using a custom @FacesValidator and i checked if there are some attribute in f:validateLength to do this but i didn't find any. Is writing a FacesValidator the only solution ?

user6008337
  • 221
  • 3
  • 15

1 Answers1

1

Use message-bundle (similar but not same as resource-bundle) to override default conversion and validation messages:

https://stackoverflow.com/a/2668602/1072089

Community
  • 1
  • 1
Nikola
  • 554
  • 1
  • 4
  • 20