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: native support for standard schema libraries #1020

Merged

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
  • Update valibot tests (bug in the library, already reported)
  • Bump validator versions
  • Doublecheck docs (+ mention minimum libs version)

Copy link

nx-cloud bot commented Nov 16, 2024

☁️ Nx Cloud Report

CI is running/has finished running commands for commit 336368d. 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

npm i https://pkg.pr.new/@tanstack/angular-form@1020

@tanstack/form-core

npm i https://pkg.pr.new/@tanstack/form-core@1020

@tanstack/react-form

npm i https://pkg.pr.new/@tanstack/react-form@1020

@tanstack/solid-form

npm i https://pkg.pr.new/@tanstack/solid-form@1020

@tanstack/lit-form

npm i https://pkg.pr.new/@tanstack/lit-form@1020

@tanstack/valibot-form-adapter

npm i https://pkg.pr.new/@tanstack/valibot-form-adapter@1020

@tanstack/vue-form

npm i https://pkg.pr.new/@tanstack/vue-form@1020

@tanstack/yup-form-adapter

npm i https://pkg.pr.new/@tanstack/yup-form-adapter@1020

@tanstack/zod-form-adapter

npm i https://pkg.pr.new/@tanstack/zod-form-adapter@1020

commit: 336368d

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.70%. Comparing base (504f30d) to head (336368d).
Report is 2 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   86.12%   86.70%   +0.57%     
==========================================
  Files          28       29       +1     
  Lines        1110     1158      +48     
  Branches      279      300      +21     
==========================================
+ Hits          956     1004      +48     
  Misses        141      141              
  Partials       13       13              

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

@Balastrong Balastrong marked this pull request as ready for review November 16, 2024 11:52
@Balastrong Balastrong mentioned this pull request Nov 16, 2024
@Balastrong Balastrong force-pushed the feat/standard-schema-implementation branch from 4c9fcd7 to 336368d Compare December 10, 2024 21:17
@Balastrong Balastrong changed the title feat: add standard schema support for validators feat: native support for standard schema libraries Dec 10, 2024
@Balastrong Balastrong merged commit 6a82b7f into TanStack:main Dec 10, 2024
7 checks passed
@Balastrong Balastrong deleted the feat/standard-schema-implementation branch December 10, 2024 21:51
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