Parent typeTextType
ClassPasswordType



To minimize the risk of leaking the plain password, this option can only be used with the "mapped" option set to false:

1
2
3
4
$builder->add('plainPassword', PasswordType::class, [
    'hash_property_path' => 'password',
    'mapped' => false,
]);


or if you want to use it with the RepeatedType:

1
2
3
4
5
6
$builder->add('plainPassword', RepeatedType::class, [
    'type' => PasswordType::class,
    'first_options'  => ['label' => 'Password', 'hash_property_path' => 'password'],
    'second_options' => ['label' => 'Repeat Password'],
    'mapped' => false,
]);


Powered by Froala Editor