I know that I can do a custom validation message for the @ Required annotation in the Play model layer, like this:
@Required(message = "customError.required")
public String name;
But I tried to do the same for the @MinSize annotation…
@MinSize(8)(message = "customError.passwordSoShort")
public String password;
… and recieved this compilation error:
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;
There is a syntax error with your code.
Try with: