Skip to content

[BUG] Types Error: type FormInputEvents is not exporting "submit" as valid state #5660

@Shooteger

Description

@Shooteger

Environment

Types error, any platform, any Nuxt 4.x version.

Is this bug related to Nuxt or Vue?

Nuxt

Package

v4.x

Version

v4.x

Reproduction

Use UForm directly or any Nuxt UI component, that uses UForm under the hood, :validate-on="['submit'] will through a typeerror.

<UAuthForm v-else :schema="someSchema" :fields="fields" :loading="isLoading" :validate-on="['submit']" @submit="handleSubmit">

Description

When using UForm directly or any other Nuxt UI component, that uses UForm under the hood, :validate-on="['submit'] will give you a type error.

In Nuxt v2 it worked, it works now too, its just a types error. Seems like since Nuxt v3 this does not work anymore. Is this a wanted behavior? We for example only want to validate our form fields, when a user click on the submit button, not on blur or change or any other event.

Image

Additional context

No response

Logs

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingtriageAwaiting initial review and prioritizationv4#4488

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions