All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.hibernate.beanvalidation.tck.tests.xmlconfiguration.user-constraints-MultipleFieldDefinitionTest.xml Maven / Gradle / Ivy

There is a newer version: 2.0.6
Show newest version
<?xml version="1.0" encoding="UTF-8"?>
<!--

    Bean Validation TCK

    License: Apache License, Version 2.0
    See the license.txt file in the root directory or <http://www.apache.org/licenses/LICENSE-2.0>.

-->
<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">

        <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="lastname">
            <constraint annotation="javax.validation.constraints.NotNull">
            </constraint>
        </field>

    </bean>
</constraint-mappings>




© 2015 - 2024 Weber Informatics LLC | Privacy Policy