@codeparticle/formal
Version:
A <2kb library for validating data of any kind
14 lines (12 loc) • 304 B
JavaScript
import {
createRule
} from "./chunk-DDICIM7S.mjs";
// src/rules/max-length.ts
var maxLength = (max) => createRule({
condition: (str) => Boolean(str) && str.length <= max,
message: `Must be shorter than ${max + 1} characters`
});
export {
maxLength
};
//# sourceMappingURL=chunk-FMPYXFS3.mjs.map