org.hibernate.beanvalidation.tck.tests.xmlconfiguration.user-constraints-MultipleBeanDefinitionTest.xml Maven / Gradle / Ivy
<?xml version="1.0" encoding="UTF-8"?> <constraint-mappings xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://jboss.org/xml/ns/javax/validation/mapping validation-mapping-1.0.xsd" xmlns="http://jboss.org/xml/ns/javax/validation/mapping"> <default-package>org.hibernate.beanvalidation.tck.tests.xmlconfiguration</default-package> <bean class="User" ignore-annotations="false"> <class ignore-annotations="true"> <group-sequence> <value>User</value> <value>Optional</value> </group-sequence> <constraint annotation="org.hibernate.beanvalidation.tck.tests.xmlconfiguration.ConsistentUserInformation"> <message>Message from xml</message> <groups> <value>javax.validation.groups.Default</value> </groups> <element name="stringParam">foobar</element> <element name="stringArrayParam"> <value>foo</value> <value>bar</value> </element> <element name="intParam"> <value>42</value> </element> <element name="patterns"> <annotation> <element name="regexp">myRegExp1</element> </annotation> <annotation> <element name="regexp">myRegExp2</element> </annotation> </element> <element name="userType">SELLER</element> </constraint> </class> <field name="lastname"> <constraint annotation="javax.validation.constraints.Pattern"> <message>Last name has to start with with a capital letter.</message> <element name="regexp">^[A-Z][a-z]+</element> </constraint> </field> <field name="creditcard"> <valid/> </field> <getter name="firstname" ignore-annotations="true"> <constraint annotation="javax.validation.constraints.Size"> <message>Size is limited!</message> <groups> <value>org.hibernate.beanvalidation.tck.tests.xmlconfiguration.TestGroup</value> <value>javax.validation.groups.Default</value> </groups> <element name="max">10</element> </constraint> </getter> </bean> <constraint-definition annotation="org.hibernate.beanvalidation.tck.tests.xmlconfiguration.ConsistentUserInformation"> <validated-by include-existing-validators="false"> <value>org.hibernate.beanvalidation.tck.tests.xmlconfiguration.CustomConsistentUserValidator</value> </validated-by> </constraint-definition> </constraint-mappings>
© 2015 - 2025 Weber Informatics LLC | Privacy Policy