Package | Description |
---|---|
cn.hutool.extra.validation |
基于JSR-380标准的校验工具类,封装了javax.validation的API
|
Modifier and Type | Method and Description |
---|---|
BeanValidationResult |
BeanValidationResult.addErrorMessage(BeanValidationResult.ErrorMessage errorMessage)
增加错误信息
|
BeanValidationResult |
BeanValidationResult.setErrorMessages(List<BeanValidationResult.ErrorMessage> errorMessages)
设置错误信息列表
|
BeanValidationResult |
BeanValidationResult.setSuccess(boolean success)
设置是否通过
|
static <T> BeanValidationResult |
ValidationUtil.warpValidate(T bean,
Class<?>... groups)
校验对象
|
static <T> BeanValidationResult |
ValidationUtil.warpValidateProperty(T bean,
String propertyName,
Class<?>... groups)
校验bean的某一个属性
|
Copyright © 2024. All rights reserved.