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

com.sc.channel.wxpay.utils.ValidateUtil Maven / Gradle / Ivy

package com.sc.channel.wxpay.utils;


import com.sc.channel.wxpay.base.service.Validator;

import java.util.Map;


public class ValidateUtil {
    public static void validate(Validator[] values, Map data) {
        for (Validator v : values) {
            if (v.isRequired()) {
                if (data.get(v.getField()) == null) {
                    throw new IllegalArgumentException(v.getField() + "不能为空");
                }
            }
        }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy