8000 * added an example annotation for type constraint · merk/symfony-docs@d7adfc5 · GitHub
[go: up one dir, main page]

Skip to content

Commit d7adfc5

Browse files
committed
* added an example annotation for type constraint
1 parent 9c0e585 commit d7adfc5

File tree

1 file changed

+14
-4
lines changed

1 file changed

+14
-4
lines changed

reference/constraints/Type.rst

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,21 @@ Type
33

44
Validates that a value has a specific data type
55

6-
.. code-block:: yaml
6+
.. configuration-block::
7+
8+
.. code-block:: yaml
9+
10+
properties:
11+
age:
12+
- Type: integer
13+
14+
.. code-block:: php-annotations
15+
16+
/**
17+
* @Assert\Type(type="integer")
18+
*/
19+
protected $age;
720
8-
properties:
9-
age:
10-
- Type: integer
1121
1222
Options
1323
-------

0 commit comments

Comments
 (0)
0