Skip to content

moveFieldValues doesn’t respect UpdateMetaOptions #1764

@PejmanNik

Description

@PejmanNik

Describe the bug

Validation runs after moveFieldValues without respecting UpdateMetaOptions.dontValidate

this.validateField(field, 'change')
// Validate the moved fields
this.validateField(`${field}[${index1}]` as DeepKeys<TFormData>, 'change')
this.validateField(`${field}[${index2}]` as DeepKeys<TFormData>, 'change')

I’m happy to create a PR to address this if you think it’s reasonable

Your minimal, reproducible example

There is a direct link to code with issue

Steps to reproduce

Call the moveFieldValues for a form with validation

Expected behavior

Do not run the validation when dontValidate is true

How often does this bug happen?

Every time

Screenshots or Videos

No response

Platform

All

TanStack Form adapter

None

TanStack Form version

1.23.0

TypeScript version

5.8.3

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions