Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
The moose likes JSF and the fly likes Validation in JSF Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

JavaRanch » Java Forums » Java » JSF
Bookmark "Validation in JSF" Watch "Validation in JSF" New topic

Validation in JSF

sri pathi

Joined: Jul 15, 2008
Posts: 28
Is there a way to override the default validation error message that comes with JSF other than writing custom validators?!
For eg. the below code displays "Validation Error: Value Required" as a validation messsage. I would like to use the same validator but change the error message. I'm using RAD 7

Please let me know if this is possible at all.

Thanks in advance!
Venkat Sadasivam
Ranch Hand

Joined: May 10, 2008
Posts: 139
Yes, you can.

Here is an example:
<h:inputText value=�#{bean.value}� requiredMessage=�#{appBundle.requiredMessage}� converterMessage=�#{appBundle.converterMessage}� validatorMessage=�#{appBundle.requiredMessage}�>

“Any fool can write code that a computer can understand. Good programmers write code that humans can understand. ”<br>
-Martin Fowler
Have you checked out Aspose?
subject: Validation in JSF
It's not a secret anymore!