Skip to content

Commit 0b33b0e

Browse files
committed
chore: update ts
1 parent 7e6ce15 commit 0b33b0e

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

src/interface.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,11 @@ export interface ValidateOptions {
132132
* Validate only and not trigger UI and Field status update
133133
*/
134134
validateOnly?: boolean;
135+
/**
136+
* Recursive validate. It will validate all the name path that contains the provided one.
137+
* e.g. [['a']] will validate ['a'] , ['a', 'b'] and ['a', 1].
138+
*/
139+
recursive?: boolean;
135140
}
136141

137142
export type ValidateFields<Values = any> = {
@@ -142,11 +147,6 @@ export type ValidateFields<Values = any> = {
142147
export interface InternalValidateOptions extends ValidateOptions {
143148
triggerName?: string;
144149
validateMessages?: ValidateMessages;
145-
/**
146-
* Recursive validate. It will validate all the name path that contains the provided one.
147-
* e.g. ['a'] will validate ['a'] , ['a', 'b'] and ['a', 1].
148-
*/
149-
recursive?: boolean;
150150
}
151151

152152
export type InternalValidateFields<Values = any> = {

tests/validate.test.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -728,7 +728,7 @@ describe('Form.Validate', () => {
728728
await changeEmptyValue(container.querySelector('input'));
729729

730730
try {
731-
await form.validateFields([['username']], { recursive: true } as any);
731+
await form.validateFields([['username']], { recursive: true });
732732

733733
// Should not reach this
734734
expect(false).toBeTruthy();

0 commit comments

Comments
 (0)