We have moved our forum to GitHub Discussions. For questions about Phalcon v3/v4/v5 you can visit here and for Phalcon v6 here.

Password validation inside models

Hello.

I am trying to add a password validation for my model. I have done this:

$this->add('password', new Confirmation([
     'message' => 'Password doesn\'t match confirmation',
     'with' => 'repeat_password'
    ]));

But i dosent seem to work ?

I have a form with password and repeat_password, but it still says it not the same, but it should be.

What am i missing?

This should be added in your form class, when you create the password element.

https://docs.phalcon.io/en/3.0.0/reference/forms.html#validation