This repository has been archived on 2023-08-20. You can view files and clone it, but cannot push or open issues or pull requests.
symfony/tests/Symfony/Tests/Component/Validator/Mapping/Loader/constraint-mapping.yml

37 lines
874 B
YAML
Raw Normal View History

Symfony\Tests\Component\Validator\Fixtures\Entity:
constraints:
# Constraint without value
- NotNull: ~
# Custom constraint
- Symfony\Tests\Component\Validator\Fixtures\ConstraintA: ~
# Constraint with single value
- Min: 3
# Constraint with multiple values
- Choice: [A, B]
# Constraint with child constraints
- All:
- NotNull: ~
- Min: 3
# Option with child constraints
- All:
constraints:
- NotNull: ~
- Min: 3
# Value with child constraints
- Collection:
fields:
foo:
- NotNull: ~
- Min: 3
bar:
- Min: 5
properties:
firstName:
# Constraint with options
- Choice: { choices: [A, B], message: Must be one of %choices% }
getters:
lastName:
- NotNull: ~