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 json string validation action #957

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

Conversation

hendrikheil
Copy link
Contributor

@hendrikheil hendrikheil commented Dec 4, 2024

This PR defines a JSON action to validate strings to be valid json strings (not objects).

Recently an Issue was created to document a valibot schema to validate objects to be json compliant. In that PR @fabian-hiller mentioned a validation action to ensure strings are valid JSON. This PR aims to add that action to valibot.

I'm a bit torn if this action should be called json or jsonString. I lean towards just calling it json, which is why I went with that.

Relevant comment: #933 (comment)

There is another open PR that adds documentation for the valibot schema to validate objects for json compliance here: #936

@hendrikheil hendrikheil force-pushed the feat/json-string-validation branch from 850c22f to e0abe52 Compare December 4, 2024 09:42
@fabian-hiller fabian-hiller self-assigned this Dec 5, 2024
@fabian-hiller fabian-hiller added the enhancement New feature or request label Dec 5, 2024
@fabian-hiller
Copy link
Owner

Thank you Hendrik! I will review this PR after our v1 RC or stable v1 is out.

@hendrikheil hendrikheil force-pushed the feat/json-string-validation branch from e0abe52 to 051ab71 Compare February 24, 2025 12:34
Copy link

vercel bot commented Feb 24, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
valibot ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 24, 2025 0:36am

Copy link

pkg-pr-new bot commented Feb 24, 2025

Open in Stackblitz

npm i https://pkg.pr.new/valibot@957

commit: 051ab71

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants