register birthdateValidator

in birthdate validator, improve the message
This commit is contained in:
2015-12-10 14:55:12 +01:00
parent 71eb972c4c
commit 04c56f667a
8 changed files with 58 additions and 7 deletions

View File

@@ -48,3 +48,11 @@ services:
tags:
- { name: security.voter }
- { name: chill.role }
chill.person.birthdate_validation:
class: Chill\PersonBundle\Validator\Constraints\BirthdateValidator
arguments:
- "%chill_person.validation.birtdate_not_before%"
tags:
- { name: validator.constraint_validator, alias: birthdate_not_before }

View File

@@ -22,6 +22,8 @@ Chill\PersonBundle\Entity\Person:
- Date:
message: 'Birthdate not valid'
groups: [general, creation]
- Chill\PersonBundle\Validator\Constraints\Birthdate:
groups: [general, creation]
gender:
- NotNull:
groups: [general, creation]

View File

@@ -11,3 +11,4 @@
'Closing date is not valid': 'La date de fermeture n''est pas valide'
'Closing date can not be null': 'La date de fermeture ne peut être nulle'
The date of closing is before the date of opening: La période de fermeture est après la période d'ouverture
The birthdate must be before %date%: La date de naissance doit être avant le %date%