Validation fails
This commit is contained in:
@@ -26,15 +26,13 @@ class ChangePasswordFormType extends AbstractType
|
||||
],
|
||||
'first_options' => [
|
||||
'constraints' => [
|
||||
new NotBlank([
|
||||
'message' => 'Please enter a password',
|
||||
]),
|
||||
new Length([
|
||||
'min' => 12,
|
||||
'minMessage' => 'Your password should be at least {{ limit }} characters',
|
||||
new NotBlank(message: 'Please enter a password'),
|
||||
new Length(
|
||||
min: 12,
|
||||
minMessage: 'Your password should be at least {{ limit }} characters',
|
||||
// max length allowed by Symfony for security reasons
|
||||
'max' => 4096,
|
||||
]),
|
||||
max: 4096,
|
||||
),
|
||||
new PasswordStrength(),
|
||||
new NotCompromisedPassword(),
|
||||
],
|
||||
|
||||
@@ -21,9 +21,7 @@ class RegistrationFormType extends AbstractType
|
||||
->add('email', EmailType::class)
|
||||
->add('username', TextType::class, [
|
||||
'constraints' => [
|
||||
new NotBlank([
|
||||
'message' => 'Please enter a username',
|
||||
]),
|
||||
new NotBlank(message: 'Please enter a username'),
|
||||
],
|
||||
])
|
||||
->add('plainPassword', RepeatedType::class, [
|
||||
@@ -33,15 +31,13 @@ class RegistrationFormType extends AbstractType
|
||||
'first_options' => ['label' => 'Password'],
|
||||
'second_options' => ['label' => 'Repeat Password'],
|
||||
'constraints' => [
|
||||
new NotBlank([
|
||||
'message' => 'Please enter a password',
|
||||
]),
|
||||
new Length([
|
||||
'min' => 6,
|
||||
'minMessage' => 'Your password should be at least {{ limit }} characters',
|
||||
new NotBlank(message: 'Please enter a password'),
|
||||
new Length(
|
||||
min: 6,
|
||||
minMessage: 'Your password should be at least {{ limit }} characters',
|
||||
// max length allowed by Symfony for security reasons
|
||||
'max' => 4096,
|
||||
]),
|
||||
max: 4096,
|
||||
),
|
||||
],
|
||||
])
|
||||
;
|
||||
|
||||
@@ -16,9 +16,7 @@ class ResetPasswordRequestFormType extends AbstractType
|
||||
->add('email', EmailType::class, [
|
||||
'attr' => ['autocomplete' => 'email'],
|
||||
'constraints' => [
|
||||
new NotBlank([
|
||||
'message' => 'Please enter your email',
|
||||
]),
|
||||
new NotBlank(message: 'Please enter your email'),
|
||||
],
|
||||
])
|
||||
;
|
||||
|
||||
Reference in New Issue
Block a user