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] dateOfBirth: - Date: message: 'Birthdate not valid' groups: [general, creation] genre: - NotNull: groups: [general, creation] history: - Valid: traverse: true constraints: - Callback: methods: [isHistoryValid] groups: [history_consistent] Chill\PersonBundle\Entity\PersonHistoryFile: properties: date_opening: - Date: message: 'Opening date is not valid' - NotNull: message: 'Opening date can not be null' date_closing: - Date: message: 'Closing date is not valid' - NotNull: message: 'Closing date can not be null' groups: [closed] constraints: - Callback: methods: [isDateConsistent]