mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
51 lines
1.7 KiB
YAML
51 lines
1.7 KiB
YAML
Chill\PersonBundle\Entity\Person:
|
|
properties:
|
|
name:
|
|
- NotBlank:
|
|
groups: [general, creation]
|
|
- Length:
|
|
min: 2
|
|
max: 255
|
|
minMessage: validation.Person.constraint.name_min
|
|
maxMessage: validation.Person.constraint.name_max
|
|
groups: [general, creation]
|
|
|
|
surname:
|
|
- NotBlank:
|
|
groups: [general, creation]
|
|
- Length:
|
|
min: 2
|
|
max: 255
|
|
minMessage: validation.Person.constraint.name_min
|
|
maxMessage: validation.Person.constraint.name_max
|
|
groups: [general]
|
|
dateOfBirth:
|
|
- Date:
|
|
message: validation.Person.constraint.dateOfBirth.not_valid
|
|
groups: [general, creation]
|
|
history:
|
|
- Valid:
|
|
traverse: true
|
|
constraints:
|
|
- Callback:
|
|
methods: [isHistoryValid]
|
|
groups: [history_consistent]
|
|
|
|
|
|
|
|
Chill\PersonBundle\Entity\PersonHistoryFile:
|
|
properties:
|
|
date_opening:
|
|
- Date:
|
|
message: validation.history.date_opening.not_valid
|
|
- NotNull:
|
|
message: validation.history.date_opening.not_null
|
|
date_closing:
|
|
- Date:
|
|
message: validation.history.date_closing.not_valid
|
|
- NotNull:
|
|
message: validation.history.date_closing.not_null
|
|
groups: [closed]
|
|
constraints:
|
|
- Callback:
|
|
methods: [isDateConsistent] |