File tree Expand file tree Collapse file tree 2 files changed +3
-0
lines changed Expand file tree Collapse file tree 2 files changed +3
-0
lines changed Original file line number Diff line number Diff line change @@ -86,6 +86,7 @@ export type RuleObject = AggregationRule | ArrayRule;
86
86
export type Rule = RuleObject | RuleRender ;
87
87
88
88
export interface ValidateErrorEntity < Values = any > {
89
+ message : string ;
89
90
values : Values ;
90
91
errorFields : { name : InternalNamePath ; errors : string [ ] } [ ] ;
91
92
outOfDate : boolean ;
Original file line number Diff line number Diff line change @@ -982,7 +982,9 @@ export class FormStore {
982
982
} )
983
983
. catch ( ( results : { name : InternalNamePath ; errors : string [ ] } [ ] ) => {
984
984
const errorList = results . filter ( result => result && result . errors . length ) ;
985
+ const errorMessage = errorList [ 0 ] ?. errors ?. [ 0 ] ;
985
986
return Promise . reject ( {
987
+ message : errorMessage ,
986
988
values : this . getFieldsValue ( namePathList ) ,
987
989
errorFields : errorList ,
988
990
outOfDate : this . lastValidatePromise !== summaryPromise ,
You can’t perform that action at this time.
0 commit comments