@Override
    public void validate(Object target, Errors errors) {
        PriceIncrease pi = (PriceIncrease) target;
        if (pi == null) {
            errors.rejectValue("percentage", "error.not-sprcified", null, "value required");
        } else {
            if (pi.getPercentage() > maxPercentage) {
                errors.rejectValue("percentage", "error.too-high",new Object[]{new Integer(maxPercentage)}, "Value too high.");
            }
            if(pi.getPercentage() <= minPercentage){
                errors.rejectValue("percentage", "error.too-low",new Object[] {new Integer(minPercentage)}, "Value too low.");
            }
        }
    }