Oro\Bundle\CalendarBundle\Entity\CalendarEvent:
    constraints:
        - Oro\Bundle\CalendarBundle\Validator\Constraints\CalendarEvent: ~
    properties:
        title:
            - NotBlank:     ~
            - Length:
                max: 255
        start:
            - DateTime:     ~
            - NotBlank:     ~
            - Oro\Bundle\CalendarBundle\Validator\Constraints\DateEarlierThan: end
        end:
            - DateTime:     ~
            - NotBlank:     ~
        attendees:
            - Valid: ~
        recurrence:
            - Valid: ~
        reminders:
            - Valid: ~

Oro\Bundle\CalendarBundle\Entity\CalendarProperty:
    properties:
        targetCalendar:
            - NotBlank:     ~
        calendarAlias:
            - NotBlank:     ~
            - Length:
                max: 32
        calendar:
            - NotBlank:     ~
        backgroundColor:
            - Length:
                max: 7

Oro\Bundle\CalendarBundle\Entity\SystemCalendar:
    properties:
        name:
            - NotBlank:     ~
            - Length:
                max: 255

Oro\Bundle\CalendarBundle\Entity\Attendee:
    constraints:
        - Oro\Bundle\CalendarBundle\Validator\Constraints\Attendee: ~
    properties:
        email:
            - Email: ~
            - Length:
                max: 255
        displayName:
            - Length:
                max: 255

Oro\Bundle\CalendarBundle\Entity\Recurrence:
    constraints:
        - Oro\Bundle\CalendarBundle\Validator\Constraints\Recurrence: ~
    properties:
        interval:
            - Range:
                min: 1
                max: 999
        instance:
            - Range:
                min: 1
                max: 5
        dayOfMonth:
            - Range:
                min: 1
                max: 31
        monthOfYear:
            - Range:
                min: 1
                max: 12
        startTime:
            - DateTime: ~
            - NotBlank: ~
        endTime:
            - DateTime: ~
        occurrences:
            - Range:
                min: 1
                max: 999
        timeZone:
            - NotBlank: ~
            - Choice: {callback: [\DateTimeZone, listIdentifiers]}
