@@ -13,15 +13,15 @@ but needs to enter his old password for security.
13
13
This should **not ** be used to validate a login form, since this is done
14
14
automatically by the security system.
15
15
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
+ +----------------+-------------------------------------------------------------------------------------------- +
25
25
26
26
Basic Usage
27
27
-----------
@@ -39,16 +39,16 @@ password:
39
39
Acme\UserBundle\Form\Model\ChangePassword :
40
40
properties :
41
41
oldPassword :
42
- - Symfony\Component\Security\Core\Validator\Constraint \UserPassword :
42
+ - Symfony\Component\Security\Core\Validator\Constraints \UserPassword :
43
43
message : " Wrong value for your current password"
44
44
45
45
.. code-block :: php-annotations
46
46
47
47
// src/Acme/UserBundle/Form/Model/ChangePassword.php
48
48
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
+
52
52
class ChangePassword
53
53
{
54
54
/**
@@ -63,7 +63,7 @@ password:
63
63
64
64
<!-- src/UserBundle/Resources/config/validation.xml -->
65
65
<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" >
67
67
<option name =" message" >Wrong value for your current password</option >
68
68
</property >
69
69
</class >
@@ -72,10 +72,10 @@ password:
72
72
73
73
// src/Acme/UserBundle/Form/Model/ChangePassword.php
74
74
namespace Acme\UserBundle\Form\Model;
75
-
75
+
76
76
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
+
79
79
class ChangePassword
80
80
{
81
81
public static function loadValidatorData(ClassMetadata $metadata)
0 commit comments