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

Add new validator notValue #194

Merged
merged 3 commits into from
Oct 8, 2023
Merged

Conversation

lo1tuma
Copy link
Contributor

@lo1tuma lo1tuma commented Oct 3, 2023

Fixes #193

@netlify
Copy link

netlify bot commented Oct 3, 2023

Deploy Preview for valibot canceled.

Name Link
🔨 Latest commit e5d3301
🔍 Latest deploy log https://app.netlify.com/sites/valibot/deploys/65223d63350ed900080d411e

@fabian-hiller
Copy link
Owner

Thank you! I will review your code as soon as I find some time.

@fabian-hiller
Copy link
Owner

What do you prefer? Is there an argument for one or the other?

// Option 1
const Schema1 = string([notValue('foo')]);
const Schema2 = string([notLength(10)]);

// Option 2
const Schema3 = string([valueNot('foo')]);
const Schema4 = string([lengthNot(10)]);

@lo1tuma
Copy link
Contributor Author

lo1tuma commented Oct 6, 2023

I would prefer option 1, although I don’t have very strong opinion on that.

@fabian-hiller
Copy link
Owner

Thanks. At the moment, I think that's better, too. I'll try to review this PR over the weekend.

@fabian-hiller fabian-hiller added enhancement New feature or request priority This has priority labels Oct 6, 2023
@fabian-hiller fabian-hiller self-assigned this Oct 7, 2023
@fabian-hiller fabian-hiller merged commit 75ae6a4 into fabian-hiller:main Oct 8, 2023
5 checks passed
@lo1tuma lo1tuma deleted the not-value branch October 8, 2023 11:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request priority This has priority
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add notEqual validator
2 participants