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