Hello,

How do you change the validation message for a particular field.

I have a field that has to be 6 digits, and the messages says
anonymous wrote : length must be between 6 and 6

which just looks wrong, I would rather the message says 
anonymous wrote : Debtor Code must be 6 digits


The Code I use is
/**
  |      * @return the debtorCode
  |      */
  |     @Length(min=6,max=6)
  |     public String getDebtorCode() {
  |             return debtorCode;
  |     }
and
<s:decorate id="debtorCodeDecoration" template="layout/edit.xhtml">
  |                 <ui:define name="label">Debtor Code</ui:define>
  |                 <h:inputText id="debtorCode" required="true"
  |                              value="#{CaptureLead.debtorCode}">
  |                              <a:support event="onblur" 
reRender="debtorCodeDecoration"/>
  |                  </h:inputText>
  |             </s:decorate>

I have already tried 
/**
  |      * @return the debtorCode
  |      */
  |     @Length(min=6,max=6,message="blah blah")
  |     public String getDebtorCode() {
  |             return debtorCode;
  |     }
  | 
Which does not do anything.

Any Help?
Thanks.
Sean

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4041830#4041830

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4041830
_______________________________________________
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to