We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7c8363c commit 5130defCopy full SHA for 5130def
src/Validator/Password.php
@@ -25,16 +25,14 @@ class Password extends Compound
25
protected function getConstraints(array $options): array
26
{
27
return [
28
- new Assert\NotBlank([
29
- 'message' => 'Please enter a password',
30
- ]),
+ new Assert\NotBlank(message: 'Please enter a password'),
31
new Assert\Type('string'),
32
- new Assert\Length([
33
- 'min' => 8,
34
- 'minMessage' => 'Your password should be at least {{ limit }} characters',
+ new Assert\Length(
+ min: 8,
+ minMessage: 'Your password should be at least {{ limit }} characters',
35
// max length allowed by Symfony for security reasons
36
- 'max' => 4096,
37
+ max: 4096,
+ ),
38
new Assert\NotCompromisedPassword(skipOnError: true),
39
];
40
}
0 commit comments