Skip to content

[otp field] Field validation runs after locked hidden-input autofill #4828

@lunaxislu

Description

@lunaxislu

Problem

#4806 added a locked-state guard to OTP Field's hidden autofill input, but when the component is wrapped in Field.Root, the merged Field validation onChange can still run after the OTP Field handler returns.

This means a locked hidden-input autofill change can still clear existing Form errors or commit validation while the OTP Field is readOnly or disabled, even though the OTP Field value itself does not change.

This is the same Field validation side effect handled for Select, Combobox, and NumberField in #4810.

Expected behavior

  • Hidden-input autofill changes should be ignored while OTP Field is readOnly or disabled.
  • When wrapped in Field.Root, the internal Field validation handler should also be skipped.
  • Existing Form errors should remain intact.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions