<commit_before><?xml version="1.0" encoding="UTF-8"?>

<!--

 This file is part of the Sylius package.

 (c) <NAME>

 For the full copyright and license information, please view the LICENSE
 file that was distributed with this source code.

-->

<constraint-mapping xmlns="http://symfony.com/schema/dic/constraint-mapping"
                    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                    xsi:schemaLocation="http://symfony.com/schema/dic/constraint-mapping
                                        http://symfony.com/schema/dic/services/constraint-mapping-1.0.xsd">

    <class name="Sylius\Component\Core\Model\AdminUser">
        <constraint name="Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity">
            <option name="fields">email</option>
            <option name="message">sylius.user.email.unique</option>
            <option name="groups">sylius</option>
        </constraint>
        <constraint name="Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity">
            <option name="fields">username</option>
            <option name="message">sylius.user.username.unique</option>
            <option name="groups">sylius</option>
        </constraint>
        <property name="email">
            <constraint name="NotBlank">
                <option name="message">sylius.user.email.not_blank</option>
                <option name="groups">sylius</option>
            </constraint>
            <constraint name="Email">
                <option name="message">sylius.user.email.invalid</option>
                <option name="groups">sylius</option>
            </constraint>
        </property>
        <property name="username">
            <constraint name="NotBlank">
                <option name="message">sylius.user.username.not_blank</option>
                <option name="groups">sylius</option>
            </constraint>
        </property>
    </class>

    <class name="Sylius\Component\Core\Model\Customer">
        <constraint name="Sylius\Bundle\CoreBundle\Validator\Constraints\RegisteredUser">
            <option name="message">sylius.customer.email.registered</option>
            <option name="groups">sylius_customer_guest</option>
        </constraint>
    </class>

    <class name="Sylius\Component\Core\Model\Channel">
        <property name="taxCalculationStrategy">
            <constraint name="NotBlank" />
        </property>
    </class>

    <class name="Sylius\Component\Core\Model\Order">
        <property name="shippingAddress">
            <constraint name="Valid" />
        </property>
        <property name="billingAddress">
            <constraint name="Valid" />
        </property>
        <property name="shipments">
            <constraint name="Valid" />
        </property>
        <property name="currencyCode">
            <constraint name="Currency">
                <option name="message">sylius.order.currency_code.not_valid</option>
            </constraint>
        </property>
    </class>

    <class name="Sylius\Component\Core\Model\ProductVariant">
        <property name="price">
            <constraint name="NotBlank">
                <option name="message">sylius.product_variant.price.not_blank</option>
                <option name="groups">sylius</option>
            </constraint>
            <constraint name="Range">
                <option name="min">0.00</option>
                <option name="minMessage">sylius.product_variant.price.min</option>
                <option name="groups">sylius</option>
            </constraint>
        </property>
        <property name="originalPrice">
            <constraint name="Range">
                <option name="min">0.00</option>
                <option name="minMessage">sylius.product_variant.original_price.min</option>
                <option name="groups">sylius</option>
            </constraint>
        </property>
        <property name="onHand">
            <constraint name="NotBlank">
                <option name="message">sylius.product_variant.onHand.not_blank</option>
                <option name="groups">sylius</option>
            </constraint>
            <constraint name="Range">
                <option name="min">0</option>
                <option name="minMessage">sylius.product_variant.onHand.min</option>
                <option name="groups">sylius</option>
            </constraint>
        </property>
    </class>

    <class name="Sylius\Component\Core\Model\ShippingMethod">
        <property name="zone">
            <constraint name="NotBlank">
                <option name="message">sylius.shipping_method.zone.not_blank</option>
                <option name="groups">sylius</option>
            </constraint>
        </property>
    </class>

    <class name="Sylius\Component\Core\Model\TaxRate">
        <property name="zone">
            <constraint name="NotBlank">
                <option name="message">sylius.tax_rate.zone.not_blank</option>
                <option name="groups">sylius</option>
            </constraint>
        </property>
    </class>
    <class name="Sylius\Component\Order\Model\OrderItem">
        <constraint name="Sylius\Bundle\InventoryBundle\Validator\Constraints\InStock">
            <option name="stockablePath">variant</option>
            <option name="groups">
                <value>sylius_checkout_complete</value>
                <value>sylius</value>
            </option>
        </constraint>
    </class>

    <class name="Sylius\Component\Core\Model\Channel">
        <constraint name="Sylius\Bundle\CoreBundle\Validator\Constraints\HasEnabledEntity">
            <option name="groups">sylius</option>
        </constraint>
        <property name="defaultCurrency">
            <constraint name="NotBlank">
                <option name="message">sylius.channel.default_currency.not_blank</option>
                <option name="groups">sylius</option>
            </constraint>
        </property>
        <property name="defaultLocale">
            <constraint name="NotBlank">
                <option name="message">sylius.channel.default_locale.not_blank</option>
                <option name="groups">sylius</option>
            </constraint>
        </property>
    </class>

    <class name="Sylius\Component\Core\Model\Taxon">
        <property name="images">
            <constraint name="Valid" />
        </property>
    </class>

    <class name="Sylius\Component\Core\Model\TaxonImage">
        <constraint name="Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity">
            <option name="fields">
                <value>code</value>
                <value>owner</value>
            </option>
            <option name="errorPath">code</option>
            <option name="message">sylius.taxon_image.code.unique</option>
            <option name="groups">sylius</option>
        </constraint>
    </class>

    <class name="Sylius\Component\Core\Model\Product">
        <property name="images">
            <constraint name="Valid" />
        </property>
    </class>

    <class name="Sylius\Component\Core\Model\ProductImage">
        <constraint name="Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity">
            <option name="fields">
                <value>code</value>
                <value>owner</value>
            </option>
            <option name="errorPath">code</option>
            <option name="message">sylius.product_image.code.unique</option>
            <option name="groups">sylius</option>
        </constraint>
    </class>

</constraint-mapping><commit_msg>[Core] Minor refactor validation file<commit_after><?xml version="1.0" encoding="UTF-8"?>

<!--

 This file is part of the Sylius package.

 (c) <NAME>

 For the full copyright and license information, please view the LICENSE
 file that was distributed with this source code.

-->

<constraint-mapping xmlns="http://symfony.com/schema/dic/constraint-mapping"
                    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                    xsi:schemaLocation="http://symfony.com/schema/dic/constraint-mapping
                                        http://symfony.com/schema/dic/services/constraint-mapping-1.0.xsd">

    <class name="Sylius\Component\Core\Model\AdminUser">
        <constraint name="Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity">
            <option name="fields">email</option>
            <option name="message">sylius.user.email.unique</option>
            <option name="groups">sylius</option>
        </constraint>
        <constraint name="Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity">
            <option name="fields">username</option>
            <option name="message">sylius.user.username.unique</option>
            <option name="groups">sylius</option>
        </constraint>
        <property name="email">
            <constraint name="NotBlank">
                <option name="message">sylius.user.email.not_blank</option>
                <option name="groups">sylius</option>
            </constraint>
            <constraint name="Email">
                <option name="message">sylius.user.email.invalid</option>
                <option name="groups">sylius</option>
            </constraint>
        </property>
        <property name="username">
            <constraint name="NotBlank">
                <option name="message">sylius.user.username.not_blank</option>
                <option name="groups">sylius</option>
            </constraint>
        </property>
    </class>

    <class name="Sylius\Component\Core\Model\Channel">
        <constraint name="Sylius\Bundle\CoreBundle\Validator\Constraints\HasEnabledEntity">
            <option name="groups">sylius</option>
        </constraint>
        <property name="defaultCurrency">
            <constraint name="NotBlank">
                <option name="message">sylius.channel.default_currency.not_blank</option>
                <option name="groups">sylius</option>
            </constraint>
        </property>
        <property name="defaultLocale">
            <constraint name="NotBlank">
                <option name="message">sylius.channel.default_locale.not_blank</option>
                <option name="groups">sylius</option>
            </constraint>
        </property>
        <property name="taxCalculationStrategy">
            <constraint name="NotBlank" />
        </property>
    </class>

    <class name="Sylius\Component\Core\Model\Customer">
        <constraint name="Sylius\Bundle\CoreBundle\Validator\Constraints\RegisteredUser">
            <option name="message">sylius.customer.email.registered</option>
            <option name="groups">sylius_customer_guest</option>
        </constraint>
    </class>

    <class name="Sylius\Component\Core\Model\Order">
        <property name="shippingAddress">
            <constraint name="Valid" />
        </property>
        <property name="billingAddress">
            <constraint name="Valid" />
        </property>
        <property name="shipments">
            <constraint name="Valid" />
        </property>
        <property name="currencyCode">
            <constraint name="Currency">
                <option name="message">sylius.order.currency_code.not_valid</option>
            </constraint>
        </property>
    </class>
    
    <class name="Sylius\Component\Order\Model\OrderItem">
        <constraint name="Sylius\Bundle\InventoryBundle\Validator\Constraints\InStock">
            <option name="stockablePath">variant</option>
            <option name="groups">
                <value>sylius_checkout_complete</value>
                <value>sylius</value>
            </option>
        </constraint>
    </class>

    <class name="Sylius\Component\Core\Model\Product">
        <property name="images">
            <constraint name="Valid" />
        </property>
    </class>

    <class name="Sylius\Component\Core\Model\ProductImage">
        <constraint name="Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity">
            <option name="fields">
                <value>code</value>
                <value>owner</value>
            </option>
            <option name="errorPath">code</option>
            <option name="message">sylius.product_image.code.unique</option>
            <option name="groups">sylius</option>
        </constraint>
    </class>

    <class name="Sylius\Component\Core\Model\ProductVariant">
        <property name="price">
            <constraint name="NotBlank">
                <option name="message">sylius.product_variant.price.not_blank</option>
                <option name="groups">sylius</option>
            </constraint>
            <constraint name="Range">
                <option name="min">0.00</option>
                <option name="minMessage">sylius.product_variant.price.min</option>
                <option name="groups">sylius</option>
            </constraint>
        </property>
        <property name="originalPrice">
            <constraint name="Range">
                <option name="min">0.00</option>
                <option name="minMessage">sylius.product_variant.original_price.min</option>
                <option name="groups">sylius</option>
            </constraint>
        </property>
        <property name="onHand">
            <constraint name="NotBlank">
                <option name="message">sylius.product_variant.onHand.not_blank</option>
                <option name="groups">sylius</option>
            </constraint>
            <constraint name="Range">
                <option name="min">0</option>
                <option name="minMessage">sylius.product_variant.onHand.min</option>
                <option name="groups">sylius</option>
            </constraint>
        </property>
    </class>

    <class name="Sylius\Component\Core\Model\ShippingMethod">
        <property name="zone">
            <constraint name="NotBlank">
                <option name="message">sylius.shipping_method.zone.not_blank</option>
                <option name="groups">sylius</option>
            </constraint>
        </property>
    </class>

    <class name="Sylius\Component\Core\Model\Taxon">
        <property name="images">
            <constraint name="Valid" />
        </property>
    </class>

    <class name="Sylius\Component\Core\Model\TaxonImage">
        <constraint name="Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity">
            <option name="fields">
                <value>code</value>
                <value>owner</value>
            </option>
            <option name="errorPath">code</option>
            <option name="message">sylius.taxon_image.code.unique</option>
            <option name="groups">sylius</option>
        </constraint>
    </class>

    <class name="Sylius\Component\Core\Model\TaxRate">
        <property name="zone">
            <constraint name="NotBlank">
                <option name="message">sylius.tax_rate.zone.not_blank</option>
                <option name="groups">sylius</option>
            </constraint>
        </property>
    </class>

</constraint-mapping>
{'fraction_non_alphanumeric': 0.13966110669843793, 'fraction_numerical': 0.0022504633306857295, 'mean_word_length': 2.1949672235144853, 'pattern_counts': {'":': 0, '<': 431, '<?xml version=': 2, '>': 431, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 6}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5829890', 'n_tokens_mistral': 4127, 'n_tokens_neox': 4000, 'n_words': 600}