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

<!--

 This file is part of the Sylius package.

 (c) Sylius Sp. z o.o.

 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\Channel">
        <constraint name="Sylius\Bundle\CoreBundle\Validator\Constraints\ChannelDefaultLocaleEnabled">
            <option name="groups">sylius</option>
        </constraint>
        <constraint name="Sylius\Bundle\CoreBundle\Validator\Constraints\HasEnabledEntity">
            <option name="groups">sylius</option>
        </constraint>
        <property name="baseCurrency">
            <constraint name="NotBlank">
                <option name="message">sylius.channel.base_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="themeName">
            <constraint name="Length">
                <option name="max">255</option>
                <option name="maxMessage">sylius.channel.theme_name.max_length</option>
                <option name="groups">sylius</option>
            </constraint>
        </property>
        <property name="taxCalculationStrategy">
            <constraint name="NotBlank">
                <option name="message">sylius.channel.tax_calculation_strategy.not_blank</option>
                <option name="groups">sylius</option>
            </constraint>
            <constraint name="Length">
                <option name="max">255</option>
                <option name="maxMessage">sylius.channel.tax_calculation_strategy.max_length</option>
                <option name="groups">sylius</option>
            </constraint>
        </property>
        <property name="contactEmail">
            <constraint name="Length">
                <option name="min">2</option>
                <option name="minMessage">sylius.channel.contact_email.min</option>
                <option name="max">255</option>
                <option name="maxMessage">sylius.channel.contact_email.max</option>
                <option name="groups">sylius</option>
            </constraint>
            <constraint name="Email">
                <option name="message">sylius.channel.contact_email.invalid</option>
                <option name="mode">strict</option>
                <option name="groups">sylius</option>
            </constraint>
        </property>
        <property name="contactPhoneNumber">
            <constraint name="Length">
                <option name="max">255</option>
                <option name="maxMessage">sylius.channel.contact_phone_number.max_length</option>
                <option name="groups">sylius</option>
            </constraint>
        </property>
        <property name="channelPriceHistoryConfig">
            <constraint name="Valid" />
        </property>
    </class>
</constraint-mapping>
