obss
logo
github_iconnpm_iconVersion: 5.0.2
customly defined on hookView on GitHub

Custom rules can be defined as a function and given as a rule definition.

Validation Result: validationresultvalid
[ { "path": "val", "ruleSet": [ "required", { "rule": e=>{let{value:r}=e;return r&&(!r.includes("g")||r.length<5)?"this field should include letter `g` and its length should be greater than 5":null} } ] } ]