UNPKG

@public-ui/components

Version:

Contains all web components that belong to KoliBri - The accessible HTML-Standard.

13 lines (12 loc) 643 B
/*! * KoliBri - The accessible HTML-Standard */ import { watchJsonArrayString } from "../utils"; import { validateInputSelectOptions } from "../validators"; export const validateOptions = (component, value, options = {}) => { watchJsonArrayString(component, '_options', (item) => typeof item === 'object' && item !== null && typeof item.label === 'string' && item.label.length > 0, value, undefined, options); }; export const validateOptionsWithOptgroup = (component, value, options = {}) => { watchJsonArrayString(component, '_options', validateInputSelectOptions, value, undefined, options); }; //# sourceMappingURL=options.js.map