Skip to content

Handling Polycollections errors #51

@3kynox

Description

@3kynox

Hello !

I'm looking to manage errors with polycollections.
It's easy to manage normal fields or moyensComm validation using validation.yml file

brunoBundle\Entity\Contact:
    properties:
        moyensComm:
            - Count:
                min: 1
                max: 5
                minMessage: "Vous devez spécifier au moins un moyen de communication"
                maxMessage: "Vous ne pouvez ajouter plus de {{ limit }} moyen(s) de communication"
        text:
            - Length:
                min: 5
                max: 20
                minMessage: "Vous devez spécifier au minimum 5 caractères pour le champ 'Text'"
                maxMessage: "Vous êtes limités à {{ limit }} caractères pour le champ 'Text'"

But about Polycollections, not sure how to specify constraints.

Thanks for help.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions