This week's book giveaway is in the Kotlin forum.
We're giving away four copies of Kotlin in Action and have Dmitry Jemerov & Svetlana Isakova on-line!
See this thread for details.
Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Create a custom validation error message in JSF  RSS feed

Diyan Yordanov
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

I have the following case:
Here is my code in the scope of a <h:form> tag

I want to customize my validation error message to accept parameters. Something like "signup_username_required={0} is too long" where {0} to be changed with the username invalid input value. I can not see a way to pass parameters to the: validatorMessage="#{Message.signup_username_maxlength}".

One mote thing. If a want to apply 2 validation rules on the username field, how can i define different validation error messages for each rule?

  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!