All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.dream.template.validate.RangeValidator Maven / Gradle / Ivy

package com.dream.template.validate;


import java.util.Map;

public class RangeValidator implements Validator {
    @Override
    public String validate(Double value, Map paramMap) {
        if (value != null) {
            Double min = (Double) paramMap.get("min");
            Double max = (Double) paramMap.get("max");
            if (value < min || value > max) {
                return (String) paramMap.get("msg");
            }
        }
        return null;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy