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 12 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)

Copy link

nx-cloud bot commented Nov 16, 2024

☁️ Nx Cloud Report

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

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 88.94%. Comparing base (5473bb8) to head (ddac46f).
Report is 159 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%   88.94%   -2.61%     
==========================================
  Files          21       27       +6     
  Lines         900     1131     +231     
  Branches      206      294      +88     
==========================================
+ Hits          824     1006     +182     
- Misses         71      116      +45     
- Partials        5        9       +4     

☔ 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
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