mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-12 13:24:25 +00:00
51 lines
1.8 KiB
YAML
51 lines
1.8 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]
|
|
gender:
|
|
- NotNull:
|
|
groups: [general, creation]
|
|
accompanyingPeriods:
|
|
- Valid:
|
|
traverse: true
|
|
constraints:
|
|
- Callback:
|
|
methods: [isAccompanyingPeriodValid]
|
|
groups: [accompanying_period_consistent]
|
|
|
|
Chill\PersonBundle\Entity\AccompanyingPeriod:
|
|
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] |