-->
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.  [ 1 post ] 
Author Message
 Post subject: My custom JSF validator cancels Hibernate validation
PostPosted: Fri Oct 10, 2008 2:39 pm 
Newbie

Joined: Fri Aug 17, 2007 2:11 pm
Posts: 19
I have a column in my entity defined as


Code:
@Column(name = "TAX_CODE")
@NotNull
@Length(max = 10)
@Pattern(regex="^\\d*$", message="You can enter only numbers into this field")
public String getTaxCode() {
   return this.taxCode;
}


In my view (Seam application), I fire a custom validator
Code:
<h:inputText id="taxCode"
                   required="true"
                     size="10"
                    disabled="#{taxHome.managed}"
                    maxlength="10"
                    value="#{taxHome.instance.taxCode}">
            <f:validator validatorId="uniqueTaxValidator"  />       
                   <a4j:support event="onblur" reRender="taxCodeDecoration" bypassUpdates="true" ajaxSingle="true"/>
</h:inputText>


The problem I am having is that the @Pattern validator is not getting fired. @NotNull and @Length work fine.
If I removed my custom validator (f:validator), @Pattern validator fires ok.

Thanks for any help.
Franco


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

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.