nope-validator icon indicating copy to clipboard operation
nope-validator copied to clipboard

feat: add default method for Strings and Numbers

Open ftonato opened this issue 2 years ago • 1 comments

Description

We would like to be able to have a default value for Strings and Numbers when we receive a Falsy value.

const schema = Nope.string().default('default-value-trim').trim() // 'default-value-trim'

See #641

ftonato avatar May 27 '22 21:05 ftonato

Size Change: +27 B (0%)

Total Size: 5.65 kB

Filename Size Change
./lib/umd/index.js 5.65 kB +27 B (0%)

compressed-size-action

github-actions[bot] avatar May 27 '22 21:05 github-actions[bot]