mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-13 22:04:23 +00:00
53 lines
1.9 KiB
YAML
53 lines
1.9 KiB
YAML
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]
|
|
|
|
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] |