R
R
ruslanyugov2019-12-06 00:21:27
symfony
ruslanyugov, 2019-12-06 00:21:27

How to change error text when validating password repetition in Symfony 4 form?

Hello! I'm new to Symfony and can't figure out how to change the error text: This value is not valid. when passwords are not the same when sent. I searched a lot, but I can't figure it out. I use this builder:

$user = new User();

        $form = $this->createFormBuilder($user)
            ->add('name', TextType::class)
            ->add('last_name', TextType::class)
            ->add('login', TextType::class)
            ->add('password', RepeatedType::class, [
                'type'=>PasswordType::class
                ]
            )->getForm();
        $form->handleRequest($request);

Thank you very much in advance!

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question