I would like to know how to check whether the entered by user passwords are the same? I need solution for validation.yml file. I have something like that:
validation.yml:
ZaqU\MyBundle\Entity\SignupForm:
properties:
password:
- NotBlank:
message: trans.validation.password.notBlank
- Length:
min: 8
max: 30
minMessage: trans.validation.password.minLength
maxMessage: trans.validation.password.maxLength
rpassword:
- NotBlank:
message: trans.validation.rpassword.notBlank
What I should add to rpassword from this list: http://symfony.com/doc/current/reference/constraints.html ?
If you use the form framework together with the validator, you can use the repeated field type.
If you want to use the validator alone, you can use one of these constraints:
You'll find the constraint reference here: http://symfony.com/doc/current/reference/constraints.html