我知道我可以为 Play 模型层中的 @Required 注释做一个自定义验证消息,如下所示:
@Required(message = "customError.required")
public String name;
但是我尝试对 @MinSize 注释做同样的事情......
@MinSize(8)(message = "customError.passwordSoShort")
public String password;
...并收到此编译错误:
The file /app/models/User.java could not be compiled. Error raised is : Syntax error on token ")", ? expected
@MinSize(8)↓(message = "customError.passwordSoShort")
public String password;