Skip to content

add note to use the constraint UserPassword #12983

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 19, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .12983-suspended
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"category":"minor","has_comments":false,"squashed":true,"savepoint":"applypatch"}
24 changes: 13 additions & 11 deletions reference/constraints/UserPassword.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,19 @@ password, but needs to enter their old password for security.
This should **not** be used to validate a login form, since this is
done automatically by the security system.

+----------------+--------------------------------------------------------------------------------------------+
| Applies to | :ref:`property or method <validation-property-target>` |
+----------------+--------------------------------------------------------------------------------------------+
| Options | - `groups`_ |
| | - `message`_ |
| | - `payload`_ |
+----------------+--------------------------------------------------------------------------------------------+
| Class | :class:`Symfony\\Component\\Security\\Core\\Validator\\Constraints\\UserPassword` |
+----------------+--------------------------------------------------------------------------------------------+
| Validator | :class:`Symfony\\Component\\Security\\Core\\Validator\\Constraints\\UserPasswordValidator` |
+----------------+--------------------------------------------------------------------------------------------+
.. note::

In order to use this constraints, you should have installed the
symfony/security-core component with Composer.

========== ===================================================================
Applies to :ref:`property or method <validation-property-target>`
Options - `groups`_
- `message`_
- `payload`_
Class :class:`Symfony\\Component\\Security\\Core\\Validator\\Constraints\\UserPassword`
Validator :class:`Symfony\\Component\\Security\\Core\\Validator\\Constraints\\UserPasswordValidator`
========== ===================================================================

Basic Usage
-----------
Expand Down