File tree 1 file changed +5
-5
lines changed
1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -108,9 +108,9 @@ function useForm(
108
108
resetFields : ( newValues ?: Props ) => void ;
109
109
validate : < T = any > ( names ?: namesType , option ?: validateOptions ) => Promise < T > ;
110
110
validateField : (
111
- name ? : string ,
112
- value ? : any ,
113
- rules ?: [ Record < string , unknown > ] ,
111
+ name : string ,
112
+ value : any ,
113
+ rules : Record < string , unknown > [ ] ,
114
114
option ?: validateOptions ,
115
115
) => Promise < RuleError [ ] > ;
116
116
mergeValidateInfo : ( items : ValidateInfo | ValidateInfo [ ] ) => ValidateInfo ;
@@ -236,8 +236,8 @@ function useForm(
236
236
const validateField = (
237
237
name : string ,
238
238
value : any ,
239
- rules : any ,
240
- option : validateOptions ,
239
+ rules : Record < string , unknown > [ ] ,
240
+ option : validateOptions = { } ,
241
241
) : Promise < RuleError [ ] > => {
242
242
const promise = validateRules (
243
243
[ name ] ,
You can’t perform that action at this time.
0 commit comments