Guest User

Untitled

a guest
May 21st, 2018
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.83 KB | None | 0 0
  1. use Symfony\Component\Form\FormBuilder;
  2. use FOS\UserBundle\Form\Type\RegistrationFormType as BaseType;
  3.  
  4. class RegistrationFormType extends BaseType
  5. {
  6. public function buildForm(FormBuilder $builder, array $options)
  7. {
  8. $builder
  9. ->add('username', 'text')
  10. ->add('email', 'repeated', array(
  11. 'type' => 'email',
  12. 'first_name' => 'input',
  13. 'second_name' => 'confirm',
  14. 'invalid_message' => 'repeated.invalid.email',
  15. ))
  16. ->add('password', 'repeated', array(
  17. 'type' => 'password',
  18. 'first_name' => 'input',
  19. 'second_name' => 'confirm',
  20. 'invalid_message' => 'repeated.invalid.password',
  21. ));
  22. }
Add Comment
Please, Sign In to add comment