Hibernate Validator - Using properties in the constraints xml

Posted by Avi Y on Stack Overflow See other posts from Stack Overflow or by Avi Y
Published on 2010-04-12T08:01:39Z Indexed on 2010/04/12 8:03 UTC
Read the original article Hit count: 350

Filed under:
|

Hi, I have just started using hibernate validator.

I am creating the constraints in an XML file(not annotations).

The only problem I am having is that I would like to use properties inside the constraints.


For example:

<bean class="MyBean"    > 
   <constraint annotation="javax.validation.constraints.Min">
            <element name="value">{myProperty}</element>
        </constraint>
</bean>

and I would like to define these properties in a separate file.


Do you think that's possible?

Any help would be appreciated.

© Stack Overflow or respective owner

Related posts about java

Related posts about hibernate-validator