| 程序包 | 说明 |
|---|---|
| cn.ponfee.commons.constrain |
| 类和说明 |
|---|
| Constraint
`@Constraints({
`@Constraint(field = "name", notBlank = true, maxLen = 64),
`@Constraint(field = "type", series = { 1, 2 })
})
or
`@Constraint(notBlank = true, maxLen = 64)
private String name;
参数约束
|
| Constraint.Tense
时态(过去或将来)
|
| Constraints
`@Constraints({
`@Constraint(field = "name", notBlank = true, maxLen = 64),
`@Constraint(field = "type", series = { 1, 2 }),
})
方法参数校验器
|
| FieldValidator
校验bean实体中含@Constraint注解的属性
e.g.
|
Copyright © 2023. All rights reserved.