File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
packages/core/src/components Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -604,18 +604,18 @@ export default class Form<
604604 if ( resolvedSchema ?. type !== 'object' && resolvedSchema ?. type !== 'array' ) {
605605 filteredErrors . __errors = schemaErrors . __errors ;
606606 }
607- // Removing undefined and empty errors.
608- const filterUndefinedErrors = ( errors : any ) : ErrorSchema < T > => {
607+ // Removing undefined, null and empty errors.
608+ const filterNilOrEmptyErrors = ( errors : any ) : ErrorSchema < T > => {
609609 _forEach ( errors , ( errorAtKey , errorKey : keyof typeof errors ) => {
610610 if ( _isNil ( errorAtKey ) ) {
611611 delete errors [ errorKey ] ;
612612 } else if ( typeof errorAtKey === 'object' && ! Array . isArray ( errorAtKey . __errors ) ) {
613- filterUndefinedErrors ( errorAtKey ) ;
613+ filterNilOrEmptyErrors ( errorAtKey ) ;
614614 }
615615 } ) ;
616616 return errors ;
617617 } ;
618- return filterUndefinedErrors ( filteredErrors ) ;
618+ return filterNilOrEmptyErrors ( filteredErrors ) ;
619619 }
620620
621621 /** Function to handle changes made to a field in the `Form`. This handler receives an entirely new copy of the
You can’t perform that action at this time.
0 commit comments