Reputation: 7309
I'm searching for a description how to write custom constraints in java for playframework 2.0? Something similar to the description in for play 1.x Has anyone a hint where to find it? The description in the official doumentation is really small.
Upvotes: 1
Views: 765
Reputation: 1051
Play 2.0 uses the Spring data binder (for Java at least). The Spring data binder uses the JSR-303 Bean Validation API. So if you want to write a custom constraint, you should write a 'JSR-303 custom constraint'.
IMO this is a pretty good tutorial to start with: link.
Upvotes: 2