Chill\PersonBundle\Entity\Person: properties: firstName: - NotBlank: groups: [general, creation] - Length: min: 2 max: 255 minMessage: 'This name is too short. It must containt {{ limit }} chars' maxMessage: 'This name is too long. It must containt {{ limit }} chars' groups: [general, creation] lastName: - NotBlank: groups: [general, creation] - Length: min: 2 max: 255 minMessage: 'This name is too short. It must containt {{ limit }} chars' maxMessage: 'This name is too long. It must containt {{ limit }} chars' groups: [general, creation] birthdate: - Date: message: 'Birthdate not valid' groups: [general, creation] - Chill\PersonBundle\Validator\Constraints\Birthdate: groups: [general, creation] gender: - NotNull: groups: [general, creation] accompanyingPeriods: - Valid: traverse: true constraints: - Callback: methods: [isAccompanyingPeriodValid] groups: [accompanying_period_consistent] - Callback: methods: [isAddressesValid] groups: [addresses_consistent] Chill\PersonBundle\Entity\AccompanyingPeriod: properties: openingDate: - Date: message: 'Opening date is not valid' - NotNull: message: 'Opening date can not be null' closingDate: - Date: message: 'Closing date is not valid' - NotNull: message: 'Closing date can not be null' groups: [closed] constraints: - Callback: methods: [isDateConsistent]