UNPKG

@mantine/form

Version:

Mantine form management library

16 lines (15 loc) 526 B
"use client"; //#region packages/@mantine/form/src/validators/is-not-empty/is-not-empty.ts function isNotEmpty(error) { const _error = error || true; return (value) => { if (typeof value === "string") return value.trim().length > 0 ? null : _error; if (Array.isArray(value)) return value.length > 0 ? null : _error; if (value === null || value === void 0) return _error; if (value === false) return _error; return null; }; } //#endregion exports.isNotEmpty = isNotEmpty; //# sourceMappingURL=is-not-empty.cjs.map