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.
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 validationonChangecan 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
readOnlyordisabled, 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
readOnlyordisabled.Field.Root, the internal Field validation handler should also be skipped.