Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Message parameter not exists in PasswordStrength constraint attribute #50651

Copy link
Copy link
Closed
@4d4ch4u32

Description

@4d4ch4u32
Issue body actions

Symfony version(s) affected

6.3.0

Description

I just upgraded to Symfony 6.3 to use the new PasswordStrength constraint. In the docs I can see how to change the message that is issued when the password does not reach the minimum required score. But the parameter message is not existent for the attribute.

Link to documentation: https://symfony.com/doc/current/reference/constraints/PasswordStrength.html#message

How to reproduce

Using the attribute as documented, e.g.

use Symfony\Component\Validator\Constraints\PasswordStrength;

...

    #[PasswordStrength(
        minScore: PasswordStrength::STRENGTH_STRONG,
        message: 'A message for the user if the password is not strong enough.'
    )]
    private string $plainPassword;

Possible Solution

Adding the parameter to the attribute.

Additional Context

Just another point: the documentation about the requirements of each score (1-4) is a bit unclear in the current version of the documentation.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.