UNPKG
@codeparticle/formal
Version:
latest (2.0.1)
2.0.1
2.0.0
1.0.6
1.0.5
1.0.4
1.0.3
1.0.2
1.0.1
1.0.0
0.4.6
0.4.4
0.4.3
0.4.2
0.4.0
0.3.0
0.2.1
0.1.0
0.0.7
0.0.6
0.0.3
0.0.0
A <2kb library for validating data of any kind
github.com/codeparticle/formal
codeparticle/formal
@codeparticle/formal
/
chunk-ZZIONSOO.mjs
14 lines
(12 loc)
•
289 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
10
11
12
13
14
import
{ createRule }
from
"./chunk-DDICIM7S.mjs"
;
// src/rules/min-length.ts
var
minLength
= (
length
) =>
createRule
({
condition
:
(
str
) =>
str.
length
>= length,
message
:
`Must be at least
${length}
characters`
});
export
{ minLength };
//# sourceMappingURL=chunk-ZZIONSOO.mjs.map