UNPKG

@inkline/inkline

Version:

Inkline is the intuitive UI Components library that gives you a developer-friendly foundation for building high-quality, accessible, and customizable Vue.js 3 Design Systems.

21 lines (20 loc) 524 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.custom = void 0; const custom = async (value, options) => { if (!options.validator) { console.error("No `validator` function provided for custom validator."); return true; } if (value?.constructor === Array) { let valid = true; for (const v of value) { valid = valid && (await options.validator(v, options)); } return valid; } return options.validator(value, options); }; exports.custom = custom;