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;
8686export type Rule = RuleObject | RuleRender ;
8787
8888export interface ValidateErrorEntity < Values = any > {
89+ message : string ;
8990 values : Values ;
9091 errorFields : { name : InternalNamePath ; errors : string [ ] } [ ] ;
9192 outOfDate : boolean ;
Original file line number Diff line number Diff line change @@ -982,7 +982,9 @@ export class FormStore {
982982 } )
983983 . catch ( ( results : { name : InternalNamePath ; errors : string [ ] } [ ] ) => {
984984 const errorList = results . filter ( result => result && result . errors . length ) ;
985+ const errorMessage = errorList [ 0 ] ?. errors ?. [ 0 ] ;
985986 return Promise . reject ( {
987+ message : errorMessage ,
986988 values : this . getFieldsValue ( namePathList ) ,
987989 errorFields : errorList ,
988990 outOfDate : this . lastValidatePromise !== summaryPromise ,
You can’t perform that action at this time.
0 commit comments