\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```",[3170,3171],{"name":3158,"color":3159},{"name":3144,"color":3145},4873,"`UForm` `onSubmit` type is needlessly constrained","2025-09-02T05:54:14Z","https://github.com/nuxt/ui/issues/4873",0.7509237,{"description":3178,"labels":3179,"number":3183,"owner":3147,"repository":3147,"state":3149,"title":3184,"updated_at":3185,"url":3186,"score":3187},"### Environment\r\n\r\n------------------------------\r\n- Operating System: Linux\r\n- Node Version: v18.20.3\r\n- Nuxt Version: 3.12.3\r\n- CLI Version: 3.12.0\r\n- Nitro Version: 2.9.7\r\n- Package Manager: npm@10.2.3\r\n- Builder: -\r\n- User Config: compatibilityDate, devtools\r\n- Runtime Modules: -\r\n- Build Modules: -\r\n------------------------------\r\n\r\n### Reproduction\r\n\r\nhttps://stackblitz.com/edit/github-zbhjwu\r\n\r\n### Describe the bug\r\n\r\nDepending on if the api returns success or an error, the global middleware runs. I would expect it in both cases to not run as the request should solely be handled by the server. \r\nIn the reproduction this can be verified by calling:\r\n1. `/api/success` to see that the middleware doesn't run on success (as expected)\r\n2. `/api/test` to see that the middleware runs when the api returns `createError`\r\n\r\n### Additional context\r\n\r\n_No response_\r\n\r\n### Logs\r\n\r\n_No response_",[3180],{"name":3181,"color":3182},"pending triage","E99695",28161,"global nuxt middleware runs when api returns error","2024-07-15T18:39:00Z","https://github.com/nuxt/nuxt/issues/28161",0.7546343,{"description":3189,"labels":3190,"number":3194,"owner":3147,"repository":3148,"state":3149,"title":3195,"updated_at":3196,"url":3197,"score":3198},"### Environment\n\n- Operating System: Darwin\n- Node Version: v24.4.0\n- Nuxt Version: 4.0.2\n- CLI Version: 3.27.0\n- Nitro Version: 2.12.4\n- Package Manager: pnpm@10.13.1\n- Builder: -\n- User Config: ssr, devtools, alias, compatibilityDate, imports, modules, i18n, ui, icon, runtimeConfig\n- Runtime Modules: @nuxtjs/i18n@10.0.3, @vueuse/nuxt@13.6.0\n- Build Modules: -\n\n### Is this bug related to Nuxt or Vue?\n\nNuxt\n\n### Version\n\nrepro is v3.16.x but also getting this in my app v4.0.2\n\n### Reproduction\n\nhttps://codesandbox.io/p/devbox/keen-wu-r7zr6y\n\n### Description\n\nUSelect doesn't allow setting aria-required=\"true\", only when using the `required` attribute does aria-required also get set to true.\n\nWe should be able to set aria-required without having to also set required.\n\nReason being is that when used inside UForm, required attr prevents the form submission, overrides any custom validation messages and shows the browser alert instead.\n\nUsing just `aria-required` (and **not** `required`) allows the input to still be accessible but also use any custom validation provided.\n\nPlease see codepen for examples.\n\n### Additional context\n\n_No response_\n\n### Logs\n\n```shell-script\n\n```",[3191,3192,3193],{"name":3158,"color":3159},{"name":3141,"color":3142},{"name":3144,"color":3145},4765,"Can't set aria-required=\"true\" on USelect","2025-08-15T18:06:45Z","https://github.com/nuxt/ui/issues/4765",0.7556656,{"description":3200,"labels":3201,"number":3204,"owner":3147,"repository":3148,"state":3205,"title":3206,"updated_at":3207,"url":3208,"score":3209},"### 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_",[3202,3203],{"name":3138,"color":3139},{"name":3141,"color":3142},4124,"closed","UForm: Retrigger error handler on backend errors","2025-07-11T11:01:02Z","https://github.com/nuxt/ui/issues/4124",0.63298815,{"description":3211,"labels":3212,"number":3216,"owner":3147,"repository":3148,"state":3205,"title":3217,"updated_at":3218,"url":3219,"score":3220},"### Description\n\nIn v2 there was the option to validate a form only when submitting:\n\n```html\n\u003CUForm\n :schema\n :state\n :validate-on=\"['submit']\"\n>\n```\n\nWith v3 this option is gone. Can it be brought back?\n\n### Additional context\n\nI once read that form validation / show errors on submit and on blur are the best user experiences (depending on usecase) but the first one isnt possible anymore?\n\nRelated: https://github.com/nuxt/ui/issues/3853",[3213,3214,3215],{"name":3138,"color":3139},{"name":3141,"color":3142},{"name":3144,"color":3145},4540,"Docs: Form validate on-submit","2025-07-22T19:11:45Z","https://github.com/nuxt/ui/issues/4540",0.6749766,{"description":3222,"labels":3223,"number":3226,"owner":3147,"repository":3148,"state":3205,"title":3227,"updated_at":3228,"url":3229,"score":3230},"### 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```",[3224,3225],{"name":3158,"color":3159},{"name":3144,"color":3145},2812,"[docs] UForm's validate-on example is incorrect","2025-05-23T16:34:02Z","https://github.com/nuxt/ui/issues/2812",0.70201975,{"description":3232,"labels":3233,"number":3241,"owner":3147,"repository":3148,"state":3205,"title":3242,"updated_at":3243,"url":3244,"score":3245},"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?",[3234,3237,3240],{"name":3235,"color":3236},"question","d876e3",{"name":3238,"color":3239},"needs reproduction","CB47CF",{"name":3141,"color":3142},3674,"can't handle submit button","2025-04-30T13:25:36Z","https://github.com/nuxt/ui/issues/3674",0.7023339,{"description":3247,"labels":3248,"number":3251,"owner":3147,"repository":3148,"state":3205,"title":3252,"updated_at":3253,"url":3254,"score":3255},"### 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_",[3249,3250],{"name":3138,"color":3139},{"name":3141,"color":3142},2599,"FormGroup eager-validation when errors exist","2025-06-29T17:15:23Z","https://github.com/nuxt/ui/issues/2599",0.7122435,["Reactive",3257],{},["Set"],["ShallowReactive",3260],{"$fTRc1wZytZ_XrK4EfJfei_Sz-An4H4Yy6syhVxH_PVJc":-1,"$f5zHC0EJBo5os7QJ1Pd5PxgAO0OPAyK4RuN4ftSxOTZI":-1},"/nuxt/ui/4168"]