From a389f2649a785092571ef4781377bcfe95651f4a Mon Sep 17 00:00:00 2001 From: Sebastiaan Stok Date: Mon, 10 Sep 2012 13:05:10 +0300 Subject: [PATCH] fixed wrong namespace of UserPassword assert The Bridge/Security directory does not exist and UserPassword is part of the Security Component not the Validator component. --- reference/constraints/UserPassword.rst | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/reference/constraints/UserPassword.rst b/reference/constraints/UserPassword.rst index f098e0ad3d3..01f67b804e8 100644 --- a/reference/constraints/UserPassword.rst +++ b/reference/constraints/UserPassword.rst @@ -16,15 +16,15 @@ but needs to enter his old password for security. When applied to an array (or Traversable object), this constraint allows you to apply a collection of constraints to each element of the array. -+----------------+----------------------------------------------------------------------------------------+ -| Applies to | :ref:`property or method` | -+----------------+----------------------------------------------------------------------------------------+ -| Options | - `message`_ | -+----------------+----------------------------------------------------------------------------------------+ -| Class | :class:`Symfony\\Bridge\\Security\\Core\\Validator\\Constraints\\UserPassword` | -+----------------+----------------------------------------------------------------------------------------+ -| Validator | :class:`Symfony\\Bridge\\Security\\Core\\Validator\\Constraint\\UserPasswordValidator` | -+----------------+----------------------------------------------------------------------------------------+ ++----------------+-------------------------------------------------------------------------------------------+ +| Applies to | :ref:`property or method` | ++----------------+-------------------------------------------------------------------------------------------+ +| Options | - `message`_ | ++----------------+-------------------------------------------------------------------------------------------+ +| Class | :class:`Symfony\\Component\\Security\\Core\\Validator\\Constraint\\UserPassword` | ++----------------+-------------------------------------------------------------------------------------------+ +| Validator | :class:`Symfony\\Component\\Security\\Core\\Validator\\Constraint\\UserPasswordValidator` | ++----------------+-------------------------------------------------------------------------------------------+ Basic Usage ----------- @@ -42,7 +42,7 @@ password: Acme\UserBundle\Form\Model\ChangePassword: properties: oldPassword: - - UserPassword: + - Symfony\Component\Security\Core\Validator\Constraint\UserPassword: message: "Wrong value for your current password" .. code-block:: php-annotations @@ -50,12 +50,12 @@ password: // src/Acme/UserBundle/Form/Model/ChangePassword.php namespace Acme\UserBundle\Form\Model; - use Symfony\Component\Validator\Constraints as Assert; + use Symfony\Component\Security\Core\Validator\Constraints as SecurityAssert; class ChangePassword { /** - * @Assert\UserPassword( + * @SecurityAssert\UserPassword( * message = "Wrong value for your current password" * ) */