From bfca2b7508ce3f13b65042008f8822367685321b Mon Sep 17 00:00:00 2001 From: Christian Flothmann Date: Sun, 23 Aug 2015 08:35:39 +0200 Subject: [PATCH] follow best practices in the constraints reference --- reference/constraints/Callback.rst | 2 +- reference/constraints/Expression.rst | 35 +++++++------- reference/constraints/GreaterThan.rst | 48 ++++++++++---------- reference/constraints/GreaterThanOrEqual.rst | 48 ++++++++++---------- reference/constraints/Image.rst | 16 +++---- reference/constraints/LessThan.rst | 48 ++++++++++---------- reference/constraints/LessThanOrEqual.rst | 48 ++++++++++---------- reference/constraints/Range.rst | 48 ++++++++++---------- reference/constraints/True.rst | 2 +- reference/constraints/Url.rst | 16 +++---- reference/constraints/Uuid.rst | 16 +++---- 11 files changed, 164 insertions(+), 163 deletions(-) diff --git a/reference/constraints/Callback.rst b/reference/constraints/Callback.rst index 218ce7f2c25..bee68c83055 100644 --- a/reference/constraints/Callback.rst +++ b/reference/constraints/Callback.rst @@ -186,7 +186,7 @@ You can then use the following configuration to invoke this validator: .. code-block:: php-annotations // src/AppBundle/Entity/Author.php - namespace Acme\BlogBundle\Entity; + namespace AppBundle\Entity; use Symfony\Component\Validator\Constraints as Assert; diff --git a/reference/constraints/Expression.rst b/reference/constraints/Expression.rst index 81fc3560275..9f5ce639966 100644 --- a/reference/constraints/Expression.rst +++ b/reference/constraints/Expression.rst @@ -24,7 +24,8 @@ Basic Usage Imagine you have a class ``BlogPost`` with ``category`` and ``isTechnicalPost`` properties:: - namespace Acme\DemoBundle\Model; + // src/AppBundle/Model/BlogPost.php + namespace AppBundle\Model; use Symfony\Component\Validator\Constraints as Assert; @@ -61,8 +62,8 @@ One way to accomplish this is with the Expression constraint: .. code-block:: yaml - # src/Acme/DemoBundle/Resources/config/validation.yml - Acme\DemoBundle\Model\BlogPost: + # src/AppBundle/Resources/config/validation.yml + AppBundle\Model\BlogPost: constraints: - Expression: expression: "this.getCategory() in ['php', 'symfony'] or !this.isTechnicalPost()" @@ -70,8 +71,8 @@ One way to accomplish this is with the Expression constraint: .. code-block:: php-annotations - // src/Acme/DemoBundle/Model/BlogPost.php - namespace Acme\DemoBundle\Model; + // src/AppBundle/Model/BlogPost.php + namespace AppBundle\Model; use Symfony\Component\Validator\Constraints as Assert; @@ -88,12 +89,12 @@ One way to accomplish this is with the Expression constraint: .. code-block:: xml - + - +