From d7adfc5a5fde105ac21dc6be872368fc30185a4a Mon Sep 17 00:00:00 2001 From: Luis Cordova Date: Sat, 9 Jul 2011 13:52:00 -0400 Subject: [PATCH] * added an example annotation for type constraint --- reference/constraints/Type.rst | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/reference/constraints/Type.rst b/reference/constraints/Type.rst index fcbc669e1e0..09e12b98d77 100644 --- a/reference/constraints/Type.rst +++ b/reference/constraints/Type.rst @@ -3,11 +3,21 @@ Type Validates that a value has a specific data type -.. code-block:: yaml +.. configuration-block:: + + .. code-block:: yaml + + properties: + age: + - Type: integer + + .. code-block:: php-annotations + + /** + * @Assert\Type(type="integer") + */ + protected $age; - properties: - age: - - Type: integer Options -------