-->
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: Can I set the Order and priority of a set of constraints?
PostPosted: Fri Jul 02, 2010 2:40 pm 
Newbie

Joined: Thu Jul 01, 2010 9:31 am
Posts: 3
Hi,

Is there a way I can set the order and priority of constraints for a single property?
For example, I have two defined constraints for the following property

@NotEmpty(message = "Not Empty message")
@Size(min = 8, message = "Less than minimum message")
private String phoneNumber;

I need it to check the size ONLY IF the NotEmpty constraint passes successfully.
Cause now if the feild is left empty, the two messages will appear!

I know that I can solve this through custom constraints, but is there a way this can be done through annotation?


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.