c39168c96cac033ddb23b8e04f935b8f8a52cc2e
[yaffs-website] / vendor / symfony / validator / Tests / Mapping / Loader / constraint-mapping.yml
1 namespaces:
2   custom: Symfony\Component\Validator\Tests\Fixtures\
3
4 Symfony\Component\Validator\Tests\Fixtures\Entity:
5   group_sequence:
6     - Foo
7     - Entity
8
9   constraints:
10     # Custom constraint
11     - Symfony\Component\Validator\Tests\Fixtures\ConstraintA: ~
12     # Custom constraint with namespaces prefix
13     - "custom:ConstraintB": ~
14     # Callbacks
15     - Callback: validateMe
16     - Callback: validateMeStatic
17     - Callback: [Symfony\Component\Validator\Tests\Fixtures\CallbackClass, callback]
18
19   properties:
20     firstName:
21       # Constraint without value
22       - NotNull: ~
23       # Constraint with single value
24       - Range:
25           min: 3
26       # Constraint with multiple values
27       - Choice: [A, B]
28       # Constraint with child constraints
29       - All:
30           - NotNull: ~
31           - Range:
32               min: 3
33       # Option with child constraints
34       - All:
35           constraints:
36             - NotNull: ~
37             - Range:
38                 min: 3
39       # Value with child constraints
40       - Collection:
41           fields:
42             foo:
43               - NotNull: ~
44               - Range:
45                   min: 3
46             bar:
47               - Range:
48                   min: 5
49       # Constraint with options
50       - Choice: { choices: [A, B], message: Must be one of %choices% }
51     dummy:
52
53   getters:
54     lastName:
55       - NotNull: ~
56     valid:
57       - "IsTrue": ~
58     permissions:
59       - "IsTrue": ~
60
61 Symfony\Component\Validator\Tests\Fixtures\GroupSequenceProviderEntity:
62   group_sequence_provider: true