Akeneo\Pim\Structure\Component\Model\Family:
    constraints:
        - Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity: code
        - Akeneo\Tool\Component\StorageUtils\Validator\Constraints\Immutable:
            properties:
                - code
        - Akeneo\Pim\Structure\Component\Validator\Constraints\FamilyRequirements: ~
        - Akeneo\Pim\Structure\Component\Validator\Constraints\FamilyAttributeAsLabel: ~
        - Akeneo\Pim\Structure\Component\Validator\Constraints\FamilyAttributeAsImage: ~
        - Akeneo\Pim\Structure\Component\Validator\Constraints\FamilyAttributeUsedAsAxis: ~
    properties:
        code:
            - NotBlank: ~
            - Regex:
                pattern: /^[a-zA-Z0-9_]+$/
                message: Family code may contain only letters, numbers and underscores
            - Length:
                max: 100
        translations:
            - Valid: ~

Akeneo\Pim\Structure\Component\Model\FamilyTranslation:
    properties:
        label:
            - Length:
                max: 100
        locale:
            - Akeneo\Channel\Component\Validator\Constraint\Locale:
                payload:
                    standardPropertyName: labels
