Skip to content

fix: canSubmit with valibot variant schema #1510

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

Closed
wants to merge 3 commits into from

Conversation

Pascalmh
Copy link
Contributor

@Pascalmh Pascalmh commented May 14, 2025

I have a issue with onMount validation when using a v.variant Schema

The thing is that this is valid:

const values = useStore(form.store, (state) => state.values);
console.log('values', v.safeParse(ValibotSchema, values)); // { success: true, … }

While form.canSubmit remains false

Observe: canSubmit remains false.

  • Select the "Dog"-Radio Button
  • Give the Dog a cool name
  • Select the "Cat"-Radio Button

Observe: canSubmit is true

Copy link

nx-cloud bot commented May 14, 2025

View your CI Pipeline Execution ↗ for commit 0b56419.

Command Status Duration Result
nx affected --targets=test:sherif,test:knip,tes... ❌ Failed 27s View ↗
nx run-many --target=build --exclude=examples/** ✅ Succeeded <1s View ↗

☁️ Nx Cloud last updated this comment at 2025-05-15 11:39:44 UTC

Copy link

pkg-pr-new bot commented May 14, 2025

More templates

@tanstack/angular-form

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

@tanstack/form-core

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

@tanstack/react-form

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

@tanstack/lit-form

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

@tanstack/svelte-form

npm i https://pkg.pr.new/@tanstack/svelte-form@1510

@tanstack/solid-form

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

@tanstack/vue-form

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

commit: 0b56419

@Pascalmh
Copy link
Contributor Author

Closing as this is continued here => #1515

@Pascalmh Pascalmh closed this May 16, 2025
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.

1 participant