Search...
FAQs
Subscribe
Pie
FAQs
Recent topics
Flagged topics
Hot topics
Best topics
Search...
Search within JSF
Search Coderanch
Advance search
Google search
Register / Login
Post Reply
Bookmark Topic
Watch Topic
New Topic
programming forums
Java
Mobile
Certification
Databases
Caching
Books
Engineering
Micro Controllers
OS
Languages
Paradigms
IDEs
Build Tools
Frameworks
Application Servers
Open Source
This Site
Careers
Other
Pie Elite
all forums
this forum made possible by our volunteer staff, including ...
Marshals:
Campbell Ritchie
Jeanne Boyarsky
Ron McLeod
Paul Clapham
Liutauras Vilda
Sheriffs:
paul wheaton
Rob Spoor
Devaka Cooray
Saloon Keepers:
Stephan van Hulst
Tim Holloway
Carey Brown
Frits Walraven
Tim Moores
Bartenders:
Mikalai Zaikin
Forum:
JSF
Customized error messages for validateLength
Rishidharan Somu
Greenhorn
Posts: 8
I like...
posted 15 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Can I display a customized error message for the <f:validateLength>?
<h:inputText id="nameField" value="#{Test.name}">
<f:validateLength minimum="2" maximum="6"/>
<h:message for="nameField"/>
</h:inputText>
The error message that is displayed is "testForm:nameField: Validation Error: Value is greater than allowable maximum of '6'".
Is there any way I can change the error message being displayed?
[ November 08, 2008: Message edited by: Rishidharan Somu ]
Christophe Verré
Sheriff
Posts: 14691
16
I like...
posted 15 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Make your own messages.properties file, and register it in your faces-config.xml using the <message-bundle> tag. For the properties files, you'll find the full list of messages keys in the
JSF
specification, 2.5.2.4 Localized Application Messages.
[My Blog]
All roads lead to JavaRanch
With a little knowledge, a
cast iron skillet
is non-stick and lasts a lifetime.
reply
reply
Bookmark Topic
Watch Topic
New Topic
Boost this thread!
Similar Threads
replacing default validator message at h:messages
Validation
Reloading JSF
A formatting question with radio buttons
Weird JSF "h:messages" tag behavior
More...