play.data.validation
注释类型 Unique
@Retention(value=RUNTIME)
@Target(value={FIELD,PARAMETER})
@Constraint(checkWith=UniqueCheck.class)
public @interface Unique
Check that a field or or field in a context is unique.
You set the context as a list (comma, semicolon or space separated)
of properties of your GenericModel
.
Message key: validation.unique
$1: field name
$2: properties which define a context in which the column must be unique
value
public abstract java.lang.String value
- 默认值:
- ""
message
public abstract java.lang.String message
- 默认值:
- "validation.unique"
Guillaume Bort & zenexity - Distributed under Apache 2 licence, without any warrantly