File tree 2 files changed +8
-2
lines changed
2 files changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -332,7 +332,13 @@ function handleIntent<Error>(
332
332
switch ( intent . type ) {
333
333
case 'validate' : {
334
334
if ( intent . payload . name ) {
335
- meta . validated [ intent . payload . name ] = true ;
335
+ if ( typeof intent . payload . name === 'string' ) {
336
+ meta . validated [ intent . payload . name ] = true ;
337
+ } else {
338
+ for ( const name of intent . payload . name ) {
339
+ meta . validated [ name ] = true ;
340
+ }
341
+ }
336
342
} else {
337
343
setFieldsValidated ( meta , fields ) ;
338
344
}
Original file line number Diff line number Diff line change @@ -303,7 +303,7 @@ export function replySubmission<FormError>(
303
303
export type ValidateIntent < Schema = any > = {
304
304
type : 'validate' ;
305
305
payload : {
306
- name ?: FieldName < Schema > ;
306
+ name ?: FieldName < Schema > | FieldName < Schema > [ ] ;
307
307
} ;
308
308
} ;
309
309
You can’t perform that action at this time.
0 commit comments