Created by elly on 2017/4/13.
function isRequired(_ref) {
    var validate = _ref.validate,
        required = _ref.required;

    return required || validate && validate.some(function (item) {
        return item.trigger !== "submit" && item.required;
    });
}