Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 405b15f

Browse files
committed
[Reference] [UserPassword] Use the non-deprecated class for Symfony 2.2
1 parent b38edbc commit 405b15f

File tree

1 file changed

+17
-17
lines changed

1 file changed

+17
-17
lines changed

reference/constraints/UserPassword.rst

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,15 @@ but needs to enter his old password for security.
1313
This should **not** be used to validate a login form, since this is done
1414
automatically by the security system.
1515

16-
+----------------+-------------------------------------------------------------------------------------------+
17-
| Applies to | :ref:`property or method<validation-property-target>` |
18-
+----------------+-------------------------------------------------------------------------------------------+
19-
| Options | - `message`_ |
20-
+----------------+-------------------------------------------------------------------------------------------+
21-
| Class | :class:`Symfony\\Component\\Security\\Core\\Validator\\Constraint\\UserPassword` |
22-
+----------------+-------------------------------------------------------------------------------------------+
23-
| Validator | :class:`Symfony\\Component\\Security\\Core\\Validator\\Constraint\\UserPasswordValidator` |
24-
+----------------+-------------------------------------------------------------------------------------------+
16+
+----------------+--------------------------------------------------------------------------------------------+
17+
| Applies to | :ref:`property or method<validation-property-target>` |
18+
+----------------+--------------------------------------------------------------------------------------------+
19+
| Options | - `message`_ |
20+
+----------------+--------------------------------------------------------------------------------------------+
21+
| Class | :class:`Symfony\\Component\\Security\\Core\\Validator\\Constraints\\UserPassword` |
22+
+----------------+--------------------------------------------------------------------------------------------+
23+
| Validator | :class:`Symfony\\Component\\Security\\Core\\Validator\\Constraints\\UserPasswordValidator` |
24+
+----------------+--------------------------------------------------------------------------------------------+
2525

2626
Basic Usage
2727
-----------
@@ -39,16 +39,16 @@ password:
3939
Acme\UserBundle\Form\Model\ChangePassword:
4040
properties:
4141
oldPassword:
42-
- Symfony\Component\Security\Core\Validator\Constraint\UserPassword:
42+
- Symfony\Component\Security\Core\Validator\Constraints\UserPassword:
4343
message: "Wrong value for your current password"
4444
4545
.. code-block:: php-annotations
4646
4747
// src/Acme/UserBundle/Form/Model/ChangePassword.php
4848
namespace Acme\UserBundle\Form\Model;
49-
50-
use Symfony\Component\Security\Core\Validator\Constraint as SecurityAssert;
51-
49+
50+
use Symfony\Component\Security\Core\Validator\Constraints as SecurityAssert;
51+
5252
class ChangePassword
5353
{
5454
/**
@@ -63,7 +63,7 @@ password:
6363
6464
<!-- src/UserBundle/Resources/config/validation.xml -->
6565
<class name="Acme\UserBundle\Form\Model\ChangePassword">
66-
<property name="Symfony\Component\Security\Core\Validator\Constraint\UserPassword">
66+
<property name="Symfony\Component\Security\Core\Validator\Constraints\UserPassword">
6767
<option name="message">Wrong value for your current password</option>
6868
</property>
6969
</class>
@@ -72,10 +72,10 @@ password:
7272
7373
// src/Acme/UserBundle/Form/Model/ChangePassword.php
7474
namespace Acme\UserBundle\Form\Model;
75-
75+
7676
use Symfony\Component\Validator\Mapping\ClassMetadata;
77-
use Symfony\Component\Security\Core\Validator\Constraint as SecurityAssert;
78-
77+
use Symfony\Component\Security\Core\Validator\Constraints as SecurityAssert;
78+
7979
class ChangePassword
8080
{
8181
public static function loadValidatorData(ClassMetadata $metadata)

0 commit comments

Comments
 (0)