-
Notifications
You must be signed in to change notification settings - Fork 603
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
fix(Form): standard schema validation no longer wrapped in value
object
#3104
base: v3
Are you sure you want to change the base?
Conversation
commit: |
Ok, the standard-schema example does show getting the data by |
Using |
Indeed, since at that point you are effectively using Valibot instead of standard-schema |
So both actually "work" but let's just follow the spec and only return the edit: I moved up the |
Quick clarification. We probably implemented Standard Schema in Nuxt UI before we changed a few things. Initially, Standard Schema required an object to be passed to its validate function with a key called The Standard Schema spec README is up-to-date and can be followed when implementing the spec. |
I have reviewed the changes and they look good to me. Thanks for fixing it and supporting the spec! Happy to answer any questions about the spec and Valibot. |
π Linked issue
Not an issue, but it was noticed in this PR: #2880
β Type of change
π Description
The standard schema validation implementation wrapped the state in an object with
value
as key:The wrapped object is now also part of the object to be validated. This means all error messages also have
value
added to their path and breaks it. I highly suspect this is an artifact left behind from copying the valibot validator from UI2?Anyways, in the
standard-schema
repo the example does not show to wrap the input data.New implementation:
π Checklist