-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 
Author Message
 Post subject: Can I declare a custom validation message besides "required"
PostPosted: Mon Mar 29, 2010 2:13 pm 
Newbie

Joined: Mon Mar 29, 2010 2:09 pm
Posts: 2
Hi, I am new to Hibernate and JSF.

Can I declare a custom validation message besides "required"?

Can I create a ValidatorMessages.properties file to do this?

What is my best course of action, I have three fields for Month, Day, and Year

They all just return "required" when using <h:message> after submitting the form. I am guessing that is what Hibernate is returning?

Here is the code:

Code:
      <h:messages id="avglobalMessages" globalOnly="true"
         styleClass="errors" /> <h:message id="monthMsg" for="month"
         styleClass="errors" /> <h:message id="dayMsg" for="day"
         styleClass="errors" /> <h:message id="yearMsg" for="year"
         styleClass="errors" />


Top
 Profile  
 
 Post subject: Re: Can I declare a custom validation message besides "required"
PostPosted: Thu Apr 01, 2010 10:56 am 
Newbie

Joined: Mon Mar 29, 2010 2:09 pm
Posts: 2
Turns out it can be handled in JSF.... requiredMessage attribute.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.