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

v2.19.2 @nuxt/ui breaks async form validation with yup #2691

Open
akarelas opened this issue Nov 19, 2024 · 2 comments · May be fixed by #2701
Open

v2.19.2 @nuxt/ui breaks async form validation with yup #2691

akarelas opened this issue Nov 19, 2024 · 2 comments · May be fixed by #2701
Assignees
Labels
bug Something isn't working triage

Comments

@akarelas
Copy link

Environment

- Operating System: Linux
- Node Version:     v20.18.0
- Nuxt Version:     3.14.159
- CLI Version:      3.15.0
- Nitro Version:    2.10.4
- Package Manager:  npm@10.8.2
- Builder:          -
- User Config:      default
- Runtime Modules:  @nuxt/ui@2.19.2, @nuxt/eslint@0.7.1, @pinia/nuxt@0.7.0
- Build Modules:    -

Version

v2.19.2

Reproduction

This is the same page with @nuxt/ui v2.19.2 : https://stackblitz.com/edit/nuxt-ui-jxfvsf?file=pages%2Findex.vue (validation doesn't work)

This is the same page with @nuxt/ui v2.18.7 : https://stackblitz.com/edit/nuxt-ui-np2mhw?file=pages%2Findex.vue (validation works)

Description

Async form validation with yup of the "username" field works perfectly in v2.18.7 - by entering a 4-letter word for example, after one second you get a "username already exists" error underneath the field, as expected.

However when we use v2.19.2, no validation of the "username" field works - neither the async nor the min length one.

On my local dev, I get this error in the console in v2.19.2 when I leave the field:

Uncaught (in promise) Error: Validation test of type: "duplicate-username" returned a Promise during a synchronous validate. This test will finish after the validate call has returned

Additional context

No response

Logs

@akarelas akarelas added bug Something isn't working triage labels Nov 19, 2024
Copy link
Member

@rdjanuar Didn't you make a fix for this already? 🤔

@rdjanuar
Copy link
Collaborator

rdjanuar commented Nov 20, 2024

@benjamincanac I forgot to resolve async validation in Yup schema. I had previously only fixed this issue in Joi

@rdjanuar rdjanuar self-assigned this Nov 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working triage
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants