Oro\Bundle\EmailBundle\Entity\EmailTemplate:
    constraints:
        - Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity:
              fields:     [ name, entityName ]
              ignoreNull: false
        - Oro\Bundle\EmailBundle\Validator\Constraints\EmailTemplateSyntax: ~
    properties:
        name:
            - NotBlank: ~
            - Length:
                min: 3
                max: 255
                allowEmptyString: false
        type:
            - NotBlank: ~
        organization:
            - NotBlank: ~
        translations:
            - Valid: ~

Oro\Bundle\EmailBundle\Form\Model\Email:
    constraints:
        - Oro\Bundle\EmailBundle\Validator\Constraints\EmailRecipients: ~
    properties:
        to:
            - Oro\Bundle\EmailBundle\Validator\Constraints\EmailAddress: ~
        cc:
            - Oro\Bundle\EmailBundle\Validator\Constraints\EmailAddress: ~
        bcc:
            - Oro\Bundle\EmailBundle\Validator\Constraints\EmailAddress: ~
        subject:
            - NotBlank: ~
        contexts:
            - Valid:
                traverse: false

Oro\Bundle\EmailBundle\Entity\Mailbox:
    properties:
        label:
            - NotBlank: ~
        origin:
            - Valid: ~
            - Oro\Bundle\EmailBundle\Validator\Constraints\MailboxOrigin: ~
        processSettings:
            - Valid: ~
        email:
            - NotBlank: ~
            - Email: ~

Oro\Bundle\EmailBundle\Entity\EmailTemplateTranslation:
    constraints:
        - Oro\Bundle\EmailBundle\Validator\Constraints\NotEmptyEmailTemplateTranslationSubject: ~
    properties:
        subject:
            - Length:
                max: 255

Oro\Bundle\EmailBundle\Entity\AutoResponseRule:
    properties:
        name:
            - NotBlank: ~
        template:
            - Valid: ~
            - NotBlank: ~
