@Override
public void validate(Max maxAnnotation, String name, ValidationContext validationCtx, Errors errors) {
Object value = validationCtx.value(name);
if (value == null)
return;
if (!(value instanceof Number))
errors.add(name, maxAnnotation.message(), value);
if (!validateMax(Double.valueOf(maxAnnotation.value()), value)) {
errors.add(name, maxAnnotation.message(), value, maxAnnotation.value());
}
}
MaxValidationAdapter.java 文件源码
java
阅读 20
收藏 0
点赞 0
评论 0
项目:geeMVC-Java-MVC-Framework
作者:
评论列表
文章目录