Skip to content

Commit 96f6d69

Browse files
ci: apply automated fixes and generate docs
1 parent a00d0bb commit 96f6d69

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

packages/form-core/src/FormApi.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1589,7 +1589,7 @@ export class FormApi<
15891589
) => {
15901590
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
15911591
const fieldInstance = this.fieldInfo[field]?.instance
1592-
1592+
15931593
if (!fieldInstance) {
15941594
// If there's no field instance, we still need to run form-level validation
15951595
// to ensure fields without components can still be validated

packages/form-core/tests/setFieldValue-validation.spec.ts

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -29,14 +29,14 @@ describe('setFieldValue validation for fields without components', () => {
2929

3030
// Set field value to empty string (should trigger validation and show error)
3131
form.setFieldValue('name', '')
32-
32+
3333
// Form should now be invalid due to validation error
3434
expect(form.state.isValid).toBe(false)
3535
expect(form.state.fieldMeta.name?.errors).toEqual(['Name is required'])
3636

3737
// Set field value to valid value (should clear validation error)
3838
form.setFieldValue('name', 'John')
39-
39+
4040
// Form should now be valid again
4141
expect(form.state.isValid).toBe(true)
4242
expect(form.state.fieldMeta.name?.errors).toEqual([])
@@ -65,22 +65,22 @@ describe('setFieldValue validation for fields without components', () => {
6565

6666
// Set field value to empty string (should trigger async validation)
6767
form.setFieldValue('email', '')
68-
68+
6969
// Wait for async validation to complete
70-
await new Promise(resolve => setTimeout(resolve, 100))
71-
70+
await new Promise((resolve) => setTimeout(resolve, 100))
71+
7272
// Form should now be invalid due to validation error
7373
expect(form.state.isValid).toBe(false)
7474
expect(form.state.fieldMeta.email?.errors).toEqual(['Email is required'])
7575

7676
// Set field value to valid value (should clear validation error)
7777
form.setFieldValue('email', 'john@example.com')
78-
78+
7979
// Wait for async validation to complete
80-
await new Promise(resolve => setTimeout(resolve, 100))
81-
80+
await new Promise((resolve) => setTimeout(resolve, 100))
81+
8282
// Form should now be valid again
8383
expect(form.state.isValid).toBe(true)
8484
expect(form.state.fieldMeta.email?.errors).toEqual([])
8585
})
86-
})
86+
})

0 commit comments

Comments
 (0)