Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add default method for Strings and Numbers #846

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ftonato
Copy link
Owner

@ftonato ftonato commented May 27, 2022

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 ftonato force-pushed the feat/default-values-for-string_number branch from 0368d4a to dada4b9 Compare May 27, 2022 21:32
@ftonato ftonato force-pushed the feat/default-values-for-string_number branch from dada4b9 to fce635a Compare May 27, 2022 21:33
@github-actions
Copy link

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

@ftonato ftonato added this to the v1.0.4 milestone May 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant