Skip to content

[Validator] Update the name of a level in PasswordStrength constraint #18252

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
Apr 26, 2023
Merged
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
11 changes: 8 additions & 3 deletions reference/constraints/PasswordStrength.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
PasswordStrength
================

.. versionadded:: 6.3

The ``PasswordStrength`` constraint was introduced in Symfony 6.3.

Validates that the given password has reached the minimum strength required by
the constraint.

Expand All @@ -15,7 +19,7 @@ Basic Usage

The following constraint ensures that the ``rawPassword`` property of the
``User`` class reaches the minimum strength required by the constraint.
By default, the minimum required score is 2.
By default, the minimum required score is ``2``.

.. configuration-block::

Expand Down Expand Up @@ -77,11 +81,12 @@ Available Options
``minScore``
~~~~~~~~~~~~

**type**: ``integer`` **default**: ``PasswordStrength::STRENGTH_REASONABLE`` (``2``)
**type**: ``integer`` **default**: ``PasswordStrength::STRENGTH_MEDIUM`` (``2``)

The minimum required strength of the password. Available constants are:

* ``PasswordStrength::STRENGTH_WEAK`` = ``1``
* ``PasswordStrength::STRENGTH_REASONABLE`` = ``2``
* ``PasswordStrength::STRENGTH_MEDIUM`` = ``2``
* ``PasswordStrength::STRENGTH_STRONG`` = ``3``
* ``PasswordStrength::STRENGTH_VERY_STRONG`` = ``4``

Expand Down