Skip to content

FormGroup eager-validation when errors exist #2599

@alexcroox

Description

@alexcroox

For what version of Nuxt UI are you suggesting this?

v2.x

Description

It would be great if there was an option for eager validation if there are errors present on the group.

For example, when initially filling out the field you don't want eager validation as it's distracting when you aren't finished typing.

However if you tab away and there's an error, when fixing the error you'd want immediate feedback with eager-validation.

So I propose a new prop: eager-validation-on-error="true" to improve the UX of forms.

Thanks!

Additional context

No response

Activity

added
v3#1289
and removed on Nov 22, 2024
romhml

romhml commented on Nov 22, 2024

@romhml
Member

The default behavior on v2 already does something close to this by triggering validation on input only after the input is blurred, but we could introduce a new mode in validate-on that triggers input validation only after the first error.

This made me realize that the eager-validation prop is not working on v3 , I think we can replace it with another validate-on mode too.

added a commit that references this issue on Jun 14, 2025
d8f29e0
romhml

romhml commented on Jun 29, 2025

@romhml
Member

We tested an implementation but the result is almost identical to the current default behavior, where validation on input only happens after a blur or change event.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

enhancementNew feature or requestv3#1289

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

    Development

    Participants

    @alexcroox@romhml

    Issue actions

      FormGroup eager-validation when errors exist · Issue #2599 · nuxt/ui