2 namespace Wallabag\CoreBundle\Form\Type
;
4 use Symfony\Component\Form\AbstractType
;
5 use Symfony\Component\Form\FormBuilderInterface
;
6 use Symfony\Component\Validator\Constraints
;
8 class ResetPasswordType
extends AbstractType
10 public function buildForm(FormBuilderInterface
$builder, array $options)
13 ->add('new_password', 'repeated', array(
15 'invalid_message' => 'The password fields must match.',
17 'first_options' => array('label' => 'New password'),
18 'second_options' => array('label' => 'Repeat new password'),
19 'constraints' => array(
20 new Constraints\
Length(array(
22 'minMessage' => 'Password should by at least 8 chars long',
24 new Constraints\
NotBlank(),
30 public function getName()
32 return 'change_passwd';