\n\u003C/template>\n```\n\nError:\n```\nType '() => Promise\u003Cnumber>' is not assignable to type '((event: FormSubmitEvent\u003Cany>) => any) & ((() => void | Promise\u003Cvoid>) | ((event: FormSubmitEvent\u003Cany>) => void | Promise\u003Cvoid>))'.\n Type '() => Promise\u003Cnumber>' is not assignable to type '((event: FormSubmitEvent\u003Cany>) => any) & (() => void | Promise\u003Cvoid>)'.ts(2322)\nForm.vue.d.ts(59, 18): The expected type comes from property 'onSubmit' which is declared here on type '__VLS_NormalizeComponentEvent\u003CNonNullable\u003C{ onSubmit?: ((event: FormSubmitEvent\u003Cany>) => any) & ((() => void | Promise\u003Cvoid>) | ((event: FormSubmitEvent\u003Cany>) => void | Promise\u003C...>)); ... 11 more ...; class?: any; } & VNodeProps & AllowedComponentProps & ComponentCustomProps>, { ...; }, \"onSubmit\", \"submit\", \"submi...'\n---\n(property) onSubmit?: ((event: FormSubmitEvent\u003Cany>) => any) & ((() => void | Promise\u003Cvoid>) | ((event: FormSubmitEvent\u003Cany>) => void | Promise\u003Cvoid>))\n```\n\n### Description\n\n`\u003CUForm>`s `@submit` event handler type require that it does not return any value. This is needlessly constraining.\n\n### Additional context\n\nThis is not required by the implementation, but instead wholly caused by the types of `onSubmit` property:\nhttps://github.com/nuxt/ui/blob/901bf7cac3ea53264b27adf879ee4072fa9ac242/src/runtime/components/Form.vue#L53\n\nResult of the `onSubmit` prop is not used at all:\nhttps://github.com/nuxt/ui/blob/901bf7cac3ea53264b27adf879ee4072fa9ac242/src/runtime/components/Form.vue#L243\n\nReplacing the type of `onSubmit` with this should be enough:\n```typescript\nexport interface FormProps\u003CS extends FormSchema, T extends boolean = true> {\n // ...\n onSubmit?: (event: FormSubmitEvent\u003CFormData\u003CS, T>>) => unknown\n}\n```\nThis should still allow passing event handlers without arguments.\n\n### Logs\n\n```shell-script\n\n```",[3137,3140],{"name":3138,"color":3139},"bug","d73a4a",{"name":3141,"color":3142},"triage","ffffff",4873,"nuxt","ui","open","`UForm` `onSubmit` type is needlessly constrained","2025-09-02T05:54:14Z","https://github.com/nuxt/ui/issues/4873",0.74492794,{"description":3152,"labels":3153,"number":3161,"owner":3144,"repository":3145,"state":3146,"title":3162,"updated_at":3163,"url":3164,"score":3165},"### Description\n\nWe are using zod for our inputs and zod supports adding multiple errors for a single input (which nicely plugs into UForm) - but I notice when we have more than 1 issue, we only see the 1st one.\n\nI was wondering if supporting multiple is do-able? \n\n### Additional context\n\n_No response_",[3154,3157,3160],{"name":3155,"color":3156},"enhancement","a2eeef",{"name":3158,"color":3159},"v3","49DCB8",{"name":3141,"color":3142},4831,"support for multiple errors for UFormField","2025-08-27T00:50:27Z","https://github.com/nuxt/ui/issues/4831",0.76426977,{"description":3167,"labels":3168,"number":3176,"owner":3144,"repository":3145,"state":3177,"title":3178,"updated_at":3179,"url":3180,"score":3181},"Currently, the `@error` event is only triggered after the form is submitted. However, validation also runs by default on `blur`, `input`, and `change` events. This means it's not possible to handle validation errors unless the form is submitted. \n\nWhy doesn’t the `@error` event emit on every validation failure, regardless of when it occurs?\n\n---\n\nAlso I think that we should be able to detect if user is coming from `submit` event or not while dealing with `@error`.",[3169,3170,3171,3174],{"name":3155,"color":3156},{"name":3158,"color":3159},{"name":3172,"color":3173},"closed-by-bot","ededed",{"name":3175,"color":3173},"stale",4168,"closed","UForm should emit `@error` on all validation failures, not just on submit","2025-08-20T02:08:44Z","https://github.com/nuxt/ui/issues/4168",0.68749934,{"description":3183,"labels":3184,"number":3187,"owner":3144,"repository":3145,"state":3177,"title":3188,"updated_at":3189,"url":3190,"score":3191},"### For what version of Nuxt UI are you suggesting this?\n\nv2.x\n\n### Description\n\nIt would be great if there was an option for eager validation if there are errors present on the group.\n\nFor example, when initially filling out the field you don't want eager validation as it's distracting when you aren't finished typing.\n\nHowever if you tab away and there's an error, when fixing the error you'd want immediate feedback with eager-validation.\n\nSo I propose a new prop: `eager-validation-on-error=\"true\"` to improve the UX of forms.\n\nThanks!\n\n### Additional context\n\n_No response_",[3185,3186],{"name":3155,"color":3156},{"name":3158,"color":3159},2599,"FormGroup eager-validation when errors exist","2025-06-29T17:15:23Z","https://github.com/nuxt/ui/issues/2599",0.70958054,{"description":3193,"labels":3194,"number":3197,"owner":3144,"repository":3145,"state":3177,"title":3198,"updated_at":3199,"url":3200,"score":3201},"### Description\n\nBased on https://ui.nuxt.com/components/form#error-event there is a way to attach things \"on form error\", like scroll the an element into view.\n\nThis does not help on back-end logic escalating a validation error or something some other logic coming from an external source.\n\nI tried\n\n- throwing an exception within submit, did not trigger the error handler\n- add errors through form refs `setErrors()`, then follow up with a `validate()` but that did nothing as well.\n\nIt would be nice to have a way to trigger the `@error` handler within the `@submit` handler, something in the spirit of:\n\n```js\nasync function onSubmit(event: FormSubmitEvent\u003C...>) {\n try { await api.doLogin() }\n catch (e) { event.fail() }\n}\n```\n\nNot sure this would be a good pattern though. Maybe if an exception is thrown within the submit handler, it could trigger the error handler as well?\n\n### Additional context\n\n_No response_",[3195,3196],{"name":3155,"color":3156},{"name":3158,"color":3159},4124,"UForm: Retrigger error handler on backend errors","2025-07-11T11:01:02Z","https://github.com/nuxt/ui/issues/4124",0.7254735,{"description":3203,"labels":3204,"number":3207,"owner":3144,"repository":3145,"state":3177,"title":3208,"updated_at":3209,"url":3210,"score":3211},"### Environment\n\nDocumentation error.\n\n### Version\n\nv2.19.2\n\n### Reproduction\n\nNot applicable\n\n### Description\n\nUnder this [subheading](https://ui.nuxt.com/components/form#input-events), there is a link to a file [here](https://github.com/nuxt/ui/blob/dev/docs/components/content/examples/FormExampleElements.vue) but it does not have the key `validate-on` on any of the components. I believe that it should be there.\n\n### Additional context\n\n_No response_\n\n### Logs\n\n```shell-script\n\n```",[3205,3206],{"name":3138,"color":3139},{"name":3141,"color":3142},2812,"[docs] UForm's validate-on example is incorrect","2025-05-23T16:34:02Z","https://github.com/nuxt/ui/issues/2812",0.72728294,{"description":3213,"labels":3214,"number":3220,"owner":3144,"repository":3145,"state":3177,"title":3221,"updated_at":3222,"url":3223,"score":3224},"### Description\n\nI see in the [examples](https://ui.nuxt.com/components/form) form validation errors appear only for fields what were used by the user - just initialized form will all fields required will not be all in red, errors appear only on fields I left empty or when I try to submit form.\r\n\r\nThis behavior does not work in my project. Here it shows required errors everywhere when I change the first field.\r\n\r\nHow this „used field“ detection works? What to do to not break it?\r\n\r\nThank you for help.",[3215,3218,3219],{"name":3216,"color":3217},"question","d876e3",{"name":3172,"color":3173},{"name":3175,"color":3173},1815,"How validation hides errors for not yet used fields","2025-06-19T02:12:24Z","https://github.com/nuxt/ui/issues/1815",0.72921026,{"description":3226,"labels":3227,"number":3233,"owner":3144,"repository":3145,"state":3177,"title":3234,"updated_at":3235,"url":3236,"score":3237},"On login page, i have UForm with validation. when clicking on register modal(UModal with #content slot) included Uform with validation, submit button doesn't trigger. if i focus on input, validation works automatically. when clicking submit button after filling all required fields, there are no error on validation(logged in the end of validation function). But no response(also logged in submit function) in submit function. how to fix it? i can't get it?",[3228,3229,3232],{"name":3216,"color":3217},{"name":3230,"color":3231},"needs reproduction","CB47CF",{"name":3158,"color":3159},3674,"can't handle submit button","2025-04-30T13:25:36Z","https://github.com/nuxt/ui/issues/3674",0.73203003,{"description":3239,"labels":3240,"number":3247,"owner":3144,"repository":3145,"state":3177,"title":3248,"updated_at":3249,"url":3250,"score":3251},"### Description\n\nI want to let customers know what password requirements they've already checked according to create a strong password, but for this I need the model value to know what they are filling in.\n\nYou can validate it on `input` (that somehow doesn't work neither until you blur it once), but that's not really what I want for the full form\n\n### Additional context\n\nhttps://ui3.nuxt.dev/components/input#with-password-strength-indicator",[3241,3242,3243,3246],{"name":3155,"color":3156},{"name":3158,"color":3159},{"name":3244,"color":3245},"nuxt/ui-pro","00dc82",{"name":3141,"color":3142},3430,"Expose v-model values in authForm","2025-05-14T13:36:42Z","https://github.com/nuxt/ui/issues/3430",0.7468047,{"description":3253,"labels":3254,"number":3256,"owner":3144,"repository":3145,"state":3177,"title":3257,"updated_at":3258,"url":3259,"score":3260},"### For what version of Nuxt UI are you suggesting this?\n\nv2.x\n\n### Description\n\nIt would be cool if the errors array from UForm supported the message parameter having an array value (multiple messages). The default backwards compatible method could just join them with a space or something. (See https://ui.nuxt.com/components/form-group#props)\nThat is all.\n\n### Additional context\n\n_No response_",[3255],{"name":3155,"color":3156},2389,"Nested form validation array of messages","2025-06-29T17:10:53Z","https://github.com/nuxt/ui/issues/2389",0.7502464,["Reactive",3262],{},["Set"],["ShallowReactive",3265],{"$fTRc1wZytZ_XrK4EfJfei_Sz-An4H4Yy6syhVxH_PVJc":-1,"$f0GStXBhdE2LsV1PLG5XpUg_kjRFTwivd_w_H_F__jC0":-1},"/nuxt/ui/4540"]