UNPKG

svelte-object

Version:

A nested component Svelte 5 Runes pattern for structuring objects/arrays and their properties

9 lines (8 loc) 288 B
export function isMin(e, min) { if (typeof e.value !== 'string' || min === undefined || min === null) return; const tooSmall = e.value.length < min && e.value.length !== 0; if (!tooSmall) return; e.error(`Value must be greater than or equal to ${min}`); }