-
Notifications
You must be signed in to change notification settings - Fork 956
refactor(Form): use formwerk
#5454
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
base: v4
Are you sure you want to change the base?
Conversation
This follows the convention used in other form components.
|
Shall we merge this into #5379? |
| disabled, | ||
| required: props.required, | ||
| controlType: 'UFileUpload' | ||
| }) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@romhml What do you think about abstracting useCustomControl<T> inside of the useFormField composable?
That way we can better standardize the setting of touched, blurred and dirty fields when users implement their own custom form fields?
I'm thinking something like this: https://github.com/nuxt/ui/blob/4dea1067caa0d3e973d329a365945dc208c163e8/src/runtime/composables/useFormField.ts
I think we'd close the other in favor of this, ultimately |
This PR is a follow-up from #5379 to refactor and simplify the Form component by using Formwerk to handle the core validation and form logic.
π Linked issue
β Type of change
π Description
π Checklist