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

Skip to content

Commit 05d6355

Browse files
committed
Renamed the constraint to NotCompromisedPassword
1 parent 92c5537 commit 05d6355

File tree

3 files changed

+11
-11
lines changed

3 files changed

+11
-11
lines changed

reference/constraints.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ Validation Constraints Reference
6666
constraints/All
6767
constraints/UserPassword
6868
constraints/Valid
69-
constraints/NotPwned
69+
constraints/NotCompromisedPassword
7070

7171
The Validator is designed to validate objects against *constraints*.
7272
In real life, a constraint could be: "The cake must not be burned". In

reference/constraints/NotPwned.rst

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
NotPwned
2-
========
1+
NotCompromisedPassword
2+
======================
33

44
.. versionadded:: 4.3
55

6-
The ``NotPwned`` constraint was introduced in Symfony 4.3.
6+
The ``NotCompromisedPassword`` constraint was introduced in Symfony 4.3.
77

88
Validates that the given password has not been compromised by checking that is
99
not included in any of the public data breaches tracked by `haveibeenpwned.com`_.
@@ -15,8 +15,8 @@ Options - `groups`_
1515
- `payload`_
1616
- `skipOnError`_
1717
- `threshold`_
18-
Class :class:`Symfony\\Component\\Validator\\Constraints\\NotPwned`
19-
Validator :class:`Symfony\\Component\\Validator\\Constraints\\NotPwnedValidator`
18+
Class :class:`Symfony\\Component\\Validator\\Constraints\\NotCompromisedPassword`
19+
Validator :class:`Symfony\\Component\\Validator\\Constraints\\NotCompromisedPasswordValidator`
2020
========== ===================================================================
2121

2222
Basic Usage
@@ -39,7 +39,7 @@ The following constraint ensures that the ``rawPassword`` property of the
3939
// ...
4040
4141
/**
42-
* @Assert\NotPwned
42+
* @Assert\NotCompromisedPassword
4343
*/
4444
protected $rawPassword;
4545
}
@@ -50,7 +50,7 @@ The following constraint ensures that the ``rawPassword`` property of the
5050
App\Entity\User:
5151
properties:
5252
rawPassword:
53-
- NotPwned
53+
- NotCompromisedPassword
5454
5555
.. code-block:: xml
5656
@@ -62,7 +62,7 @@ The following constraint ensures that the ``rawPassword`` property of the
6262
6363
<class name="App\Entity\User">
6464
<property name="rawPassword">
65-
<constraint name="NotPwned"></constraint>
65+
<constraint name="NotCompromisedPassword"></constraint>
6666
</property>
6767
</class>
6868
</constraint-mapping>
@@ -79,7 +79,7 @@ The following constraint ensures that the ``rawPassword`` property of the
7979
{
8080
public static function loadValidatorMetadata(ClassMetadata $metadata)
8181
{
82-
$metadata->addPropertyConstraint('rawPassword', new Assert\NotPwned());
82+
$metadata->addPropertyConstraint('rawPassword', new Assert\NotCompromisedPassword());
8383
}
8484
}
8585

reference/constraints/map.rst.inc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,4 +88,4 @@ Other Constraints
8888
* :doc:`Collection </reference/constraints/Collection>`
8989
* :doc:`Count </reference/constraints/Count>`
9090
* :doc:`UniqueEntity </reference/constraints/UniqueEntity>`
91-
* :doc:`NotPwned </reference/constraints/NotPwned>`
91+
* :doc:`NotCompromisedPassword </reference/constraints/NotCompromisedPassword>`

0 commit comments

Comments
 (0)