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 standard schema support for validators #1020

Open
wants to merge 18 commits into
base: main
Choose a base branch
from

Conversation

Balastrong
Copy link
Member

@Balastrong Balastrong commented Nov 16, 2024

This PR closes #1015

Initial support for Standard Schema using a validatorAdapter-like structure embedded in form-core

TODO:

  • Make it work without explicitly adding an adapter
  • Example
  • Doc
  • More tests
  • Integrate zod (once available - might be done in another PR)
  • Update valibot tests (bug in the library, already reported)

Copy link

nx-cloud bot commented Nov 16, 2024

☁️ Nx Cloud Report

CI is running/has finished running commands for commit bc585e7. As they complete they will appear below. Click to see the status, the terminal output, and the build insights.

📂 See all runs for this CI Pipeline Execution


✅ Successfully ran 2 targets

Sent with 💌 from NxCloud.

Copy link

pkg-pr-new bot commented Nov 16, 2024

Open in Stackblitz

More templates

@tanstack/angular-form

pnpm add https://pkg.pr.new/@tanstack/angular-form@1020

@tanstack/form-core

pnpm add https://pkg.pr.new/@tanstack/form-core@1020

@tanstack/react-form

pnpm add https://pkg.pr.new/@tanstack/react-form@1020

@tanstack/lit-form

pnpm add https://pkg.pr.new/@tanstack/lit-form@1020

@tanstack/solid-form

pnpm add https://pkg.pr.new/@tanstack/solid-form@1020

@tanstack/valibot-form-adapter

pnpm add https://pkg.pr.new/@tanstack/valibot-form-adapter@1020

@tanstack/vue-form

pnpm add https://pkg.pr.new/@tanstack/vue-form@1020

@tanstack/yup-form-adapter

pnpm add https://pkg.pr.new/@tanstack/yup-form-adapter@1020

@tanstack/zod-form-adapter

pnpm add https://pkg.pr.new/@tanstack/zod-form-adapter@1020

commit: bc585e7

Copy link

codecov bot commented Nov 16, 2024

Codecov Report

Attention: Patch coverage is 96.00000% with 2 lines in your changes missing coverage. Please review.

Project coverage is 86.30%. Comparing base (5473bb8) to head (bc585e7).
Report is 168 commits behind head on main.

Files with missing lines Patch % Lines
packages/form-core/src/standardSchemaValidator.ts 95.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1020      +/-   ##
==========================================
- Coverage   91.55%   86.30%   -5.26%     
==========================================
  Files          21       29       +8     
  Lines         900     1146     +246     
  Branches      206      299      +93     
==========================================
+ Hits          824      989     +165     
- Misses         71      144      +73     
- Partials        5       13       +8     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.


🚨 Try these New Features:

@Balastrong Balastrong marked this pull request as ready for review November 16, 2024 11:52
@Balastrong Balastrong mentioned this pull request Nov 16, 2024
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.

[FEATURE] Add support for Standard Schema
1 participant