BitBag\SyliusCmsPlugin\Entity\Page:
    constraints:
        - Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity:
            fields: [code]
            message: 'bitbag_sylius_cms_plugin.page.code.unique'
            groups: ['bitbag']
    properties:
        code:
            - NotBlank:
                message: 'bitbag_sylius_cms_plugin.page.code.not_blank'
                groups: ['bitbag']
            - Length:
                min: 2
                max: 250
                minMessage: 'bitbag_sylius_cms_plugin.page.code.min_length'
                maxMessage: 'bitbag_sylius_cms_plugin.page.code.max_length'
                groups: ['bitbag']
            - Regex:
                  pattern: '/^[\w-]*$/'
                  message: 'bitbag_sylius_cms_plugin.page.code.regex'
                  groups: [ 'bitbag' ]
        translations:
            - Valid: ~
