if (valList == null || valList.isEmpty())
return validation;
// 启动验证器
for (int i = valList.size() - 1; i > -1; i--) {
ValidatorConfigBean val = valList.get(i);
ValidatorIF validator = null;
if (!"".equals(val.getName())) {
// 根据name属性实例化相关的验证器,如果找不到,就根据class属性实例化
validator = ValidatorFactory.getValidator(val.getName());
if (validator == null)
try {
validator = (ValidatorIF) Class.forName(val.getClazz()).newInstance();
} catch (Exception e) {
log.error(StringUtil.getExceptionString(e));
}
}