- 'first_options' => array('label' => 'New password'),
- 'second_options' => array('label' => 'Repeat new password'),
- 'constraints' => array(
- new Constraints\Length(array(
- 'min' => 6,
- 'minMessage' => 'Password should by at least 6 chars long'
- )),
- new Constraints\NotBlank()
- )
- ))
- ->add('save', 'submit')
+ 'first_options' => ['label' => 'config.form_password.new_password_label'],
+ 'second_options' => ['label' => 'config.form_password.repeat_new_password_label'],
+ 'constraints' => [
+ new Constraints\Length([
+ 'min' => 8,
+ 'minMessage' => 'validator.password_too_short',
+ ]),
+ new Constraints\NotBlank(),
+ ],
+ 'label' => 'config.form_password.new_password_label',
+ ])
+ ->add('save', SubmitType::class, [
+ 'label' => 'config.form.save',
+ ])