Add repeated password for confirmation
This commit is contained in:
parent
f3a32e9d94
commit
354d1fbde3
@ -5,6 +5,7 @@ namespace App\Form;
|
|||||||
use App\Entity\User;
|
use App\Entity\User;
|
||||||
use Symfony\Component\Form\AbstractType;
|
use Symfony\Component\Form\AbstractType;
|
||||||
use Symfony\Component\Form\Extension\Core\Type\PasswordType;
|
use Symfony\Component\Form\Extension\Core\Type\PasswordType;
|
||||||
|
use Symfony\Component\Form\Extension\Core\Type\RepeatedType;
|
||||||
use Symfony\Component\Form\FormBuilderInterface;
|
use Symfony\Component\Form\FormBuilderInterface;
|
||||||
use Symfony\Component\OptionsResolver\OptionsResolver;
|
use Symfony\Component\OptionsResolver\OptionsResolver;
|
||||||
use Symfony\Component\Validator\Constraints\Length;
|
use Symfony\Component\Validator\Constraints\Length;
|
||||||
@ -18,7 +19,10 @@ class RegistrationFormType extends AbstractType
|
|||||||
->add('name')
|
->add('name')
|
||||||
->add('username')
|
->add('username')
|
||||||
->add('email')
|
->add('email')
|
||||||
->add('plainPassword', PasswordType::class, [
|
->add('plainPassword', RepeatedType::class, [
|
||||||
|
'type' => PasswordType::class,
|
||||||
|
'first_options' => ['label' => 'Password'],
|
||||||
|
'second_options' => ['label' => 'Repeat Password'],
|
||||||
// instead of being set onto the object directly,
|
// instead of being set onto the object directly,
|
||||||
// this is read and encoded in the controller
|
// this is read and encoded in the controller
|
||||||
'mapped' => false,
|
'mapped' => false,
|
||||||
|
Loading…
Reference in New Issue
Block a user