<?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\Review\Model\Review">
        <property name="title">
            <constraint name="NotBlank">
                <option name="message">sylius.review.title.not_blank</option>
                <option name="groups">
                    <value>sylius</value>
                </option>
            </constraint>
            <constraint name="Length">
                <option name="min">2</option>
                <option name="max">255</option>
                <option name="minMessage">sylius.review.title.min_length</option>
                <option name="maxMessage">sylius.review.title.max_length</option>
                <option name="groups">
                    <value>sylius</value>
                </option>
            </constraint>
        </property>
        <property name="rating">
            <constraint name="NotBlank">
                <option name="message">sylius.review.rating.not_blank</option>
                <option name="groups">
                    <value>sylius</value>
                </option>
            </constraint>
        </property>
        <property name="comment">
            <constraint name="NotBlank">
                <option name="message">sylius.review.comment.not_blank</option>
                <option name="groups">
                    <value>sylius</value>
                </option>
            </constraint>
        </property>
    </class>
</constraint-mapping>
