Void
Void

Reputation: 1502

How do I create a Symfony validator that needs to access other fields values?

I want to implement a Symfony validator that validates passwords for a registration form, which means I want a 'Password confirm' field. How do I make a validator that somehow ties these fields together? I need to check if the password and password confirm values match.

How are stuff like these implemented properly in Symfony?

Upvotes: 3

Views: 437

Answers (1)

greg0ire
greg0ire

Reputation: 23255

You can use a postValidator . Check the documentation, there is an example with the password confirm validation.

Upvotes: 3

Related Questions