Skip to content

Commit

Permalink
Add proper use of the password type
Browse files Browse the repository at this point in the history
The documentation still referenced using the old `type`. 

Updated the code to use `PasswordType::class` vice `password`.
  • Loading branch information
jasonmccallister authored and xabbuh committed Dec 1, 2015
1 parent 340ec5f commit 7bd1f22
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion cookbook/doctrine/registration_form.rst
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,7 @@ Next, create the form for the ``User`` entity::
use Symfony\Component\Form\Extension\Core\Type\EmailType;
use Symfony\Component\Form\Extension\Core\Type\TextType;
use Symfony\Component\Form\Extension\Core\Type\RepeatedType;
use Symfony\Component\Form\Extension\Core\Type\PasswordType;

class UserType extends AbstractType
{
Expand All @@ -169,7 +170,7 @@ Next, create the form for the ``User`` entity::
->add('email', EmailType::class)
->add('username', TextType::class)
->add('plainPassword', RepeatedType::class, array(
'type' => 'password',
'type' => PasswordType::class,
'first_options' => array('label' => 'Password'),
'second_options' => array('label' => 'Repeat Password'),
)
Expand Down

0 comments on commit 7bd1f22

Please sign in to comment.