The form mapped by ant design2.11 using mapPropsToFields cannot display validate information.

the form mapped by ant design2.11 using form.create "s mapPropsToFields cannot display validate information; the form mapped by ant design2.11 using form.create "s mapPropsToFields cannot display validate information

can trigger validate;, but message: is not displayed at the bottom of the form

but there is message in changedfield:
changedField {"indicatorAlias": {"value": "k", "name": "indicatorAlias", "touched": true, "dirty": true, "validating": true}}

mapPropsToFields (props) {

const { indicatorAlias, whitelist, blacklist, indicatorType, compareMethod, threshold } = props;
const list = {};
(whitelist || []).forEach((item, index) => {
  list[`whitelist${index}`] = { value: item };
});
(blacklist || []).forEach((item, index) => {
  list[`blacklist${index}`] = { value: item };
});
return {
  indicatorAlias: { value: indicatorAlias },
  indicatorType: { value: indicatorType || "API_COUNT" },
  compareMethod: { value: compareMethod || ">" },
  threshold: { value: threshold },
  ...list,
}

}

Jun.24,2021
Menu