@mantine/form
Version:
Mantine form management library
13 lines (12 loc) • 343 B
JavaScript
"use client";
//#region packages/@mantine/form/src/validators/matches/matches.ts
function matches(regexp, error) {
const _error = error || true;
return (value) => {
if (typeof value !== "string") return _error;
return regexp.test(value) ? null : _error;
};
}
//#endregion
exports.matches = matches;
//# sourceMappingURL=matches.cjs.map