diff --git a/Resources/config/validation.yml b/Resources/config/validation.yml index c80bae183..80011e783 100644 --- a/Resources/config/validation.yml +++ b/Resources/config/validation.yml @@ -1,9 +1,9 @@ Chill\PersonBundle\Entity\Person: properties: firstName: - - NotBlank: + - NotBlank: groups: [general, creation] - - Length: + - Length: min: 2 max: 255 minMessage: 'This name is too short. It must containt {{ limit }} chars' @@ -12,17 +12,17 @@ Chill\PersonBundle\Entity\Person: lastName: - NotBlank: groups: [general, creation] - - Length: + - 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: + - Date: message: 'Birthdate not valid' groups: [general, creation] - - Chill\PersonBundle\Validator\Constraints\Birthdate: + - Chill\PersonBundle\Validator\Constraints\Birthdate: groups: [general, creation] gender: - NotNull: @@ -32,21 +32,21 @@ Chill\PersonBundle\Entity\Person: traverse: true constraints: - Callback: - methods: [isAccompanyingPeriodValid] - groups: [accompanying_period_consistent] + callback: isAccompanyingPeriodValid + groups: [accompanying_period_consistent] - Callback: - methods: [isAddressesValid] - groups: [addresses_consistent] + callback: isAddressesValid + groups: [addresses_consistent] Chill\PersonBundle\Entity\AccompanyingPeriod: properties: openingDate: - - Date: + - Date: message: 'Opening date is not valid' - - NotNull: + - NotNull: message: 'Opening date can not be null' closingDate: - - Date: + - Date: message: 'Closing date is not valid' - NotNull: message: 'Closing date can not be null'