<?xml version="1.0" encoding="UTF-8" ?>
<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/constraint-mapping/constraint-mapping-1.0.xsd">

    <class name="Ekyna\Bundle\SettingBundle\Entity\Redirection">
        <property name="fromPath">
            <constraint name="NotBlank" />
            <constraint name="Length">
                <option name="min">2</option>
            </constraint>
        </property>
        <property name="toPath">
            <constraint name="NotBlank" />
            <constraint name="Length">
                <option name="min">2</option>
            </constraint>
        </property>
        <constraint name="Ekyna\Bundle\SettingBundle\Validator\Constraints\Redirection" />
    </class>

</constraint-mapping>
<?xml version="1.0" encoding="UTF-8" ?>
<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/constraint-mapping/constraint-mapping-1.0.xsd">

    <class name="Ekyna\Bundle\SettingBundle\Entity\Redirection">
        <property name="fromPath">
            <constraint name="NotBlank" />
            <constraint name="Length">
                <option name="min">2</option>
            </constraint>
        </property>
        <property name="toPath">
            <constraint name="NotBlank" />
            <constraint name="Length">
                <option name="min">1</option>
            </constraint>
        </property>
        <constraint name="Ekyna\Bundle\SettingBundle\Validator\Constraints\Redirection" />
    </class>

</constraint-mapping>
Allow home as redirection destination
Allow home as redirection destination
