playframework/Play20 — pull request #187 by jto (2012-03-19 05:33:44+00:00)
Title: @ValidateWith for custom Validator

Create a new annotation to use custom Validator:

```java
public static class NotEmpty extends Constraints.Validator{
public boolean isValid(String s) {
return s.trim().length() > 0;
}
}
```
and then in the model:

```java
@Constraints.ValidateWith(NotEmpty.class)
public String name;
```