nope-validator
nope-validator copied to clipboard
feat: add default method for Strings and Numbers
Description
We would like to be able to have a default value for String
s and Number
s when we receive a Falsy
value.
const schema = Nope.string().default('default-value-trim').trim() // 'default-value-trim'
See #641
Size Change: +27 B (0%)
Total Size: 5.65 kB
Filename | Size | Change |
---|---|---|
./lib/umd/index.js |
5.65 kB | +27 B (0%) |