iecanfly
iecanfly

Reputation: 658

where is @Equals annotation in playframework 2.0?

I am trying to validate the equality of password with confirmPassword field in a registration form. I am aware that in v.1(precisely v.1.2.4), you can do this using @Equals("confirmPassword") annotation. However the same functionality seems to be missing in v2.0. Am I missing out on something or v2.0 doesn't implement this anymore?

Upvotes: 0

Views: 881

Answers (1)

j.w.r
j.w.r

Reputation: 4239

Have a look at Forms Validation for Play 2.0, specifically the Constraints section. The play.data.validation.Constraints class contains several built-in validation annotations according to the documentation. They made a lot of changes between the 1.* and 2.* versions.

Upvotes: 1

Related Questions