Closed
Description
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.