com.dream.template.validate.MaxValidator Maven / Gradle / Ivy
package com.dream.template.validate;
import java.util.Map;
public class MaxValidator implements Validator {
@Override
public String validate(Double value, Map paramMap) {
if (value != null) {
Double max = (Double) paramMap.get("value");
if (value > max) {
return (String) paramMap.get("msg");
}
}
return null;
}
}