Commit 625f797
fix: useField validated-only mode for arrays (#5029)
Fix useField.validate() to properly handle 'validated-only' mode by
checking the field's validated flag. Previously, validated-only mode
was treated the same as force mode in useField, causing unintended
side effects when useFieldArray triggered form-wide validation after
mutations. Now, fields that haven't been interacted with yet will only
get their valid flag updated (silent validation) without incorrectly
marking them as validated or setting error messages prematurely.
Also adds comprehensive test coverage for useFieldArray with object
items including schema validation, meta updates (valid/dirty), nested
property mutations via computedDeep, and interaction with useField.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>1 parent 7d8cc52 commit 625f797
3 files changed
Lines changed: 660 additions & 0 deletions
File tree
- .changeset
- packages/vee-validate
- src
- tests
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
207 | 207 | | |
208 | 208 | | |
209 | 209 | | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
210 | 216 | | |
211 | 217 | | |
212 | 218 | | |
| |||
0 commit comments