- ->add('username', 'text', array('required' => true))
- ->add('plainPassword', 'repeated', array(
- 'type' => 'password',
- 'constraints' => array(
- new Constraints\Length(array(
+ ->add('username', TextType::class, [
+ 'required' => true,
+ 'label' => 'config.form_new_user.username_label',
+ ])
+ ->add('plainPassword', RepeatedType::class, [
+ 'type' => PasswordType::class,
+ 'invalid_message' => 'validator.password_must_match',
+ 'first_options' => ['label' => 'config.form_new_user.password_label'],
+ 'second_options' => ['label' => 'config.form_new_user.repeat_new_password_label'],
+ 'constraints' => [
+ new Constraints\Length([