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]