sd-formik-validators
Version:
Common validators for Formik
12 lines (11 loc) • 405 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.composeValidators = function () {
var validators = [];
for (var _i = 0; _i < arguments.length; _i++) {
validators[_i] = arguments[_i];
}
return function (value) {
return validators.reduce(function (error, validator) { return error || validator(value); }, undefined);
};
};