Commit a294c628 authored by 杨奕's avatar 杨奕 Committed by GitHub

Form: rule key supports both dot-separated and nested (#10227)

parent 4abeadb7
......@@ -235,7 +235,8 @@
const selfRules = this.rules;
const requiredRule = this.required !== undefined ? { required: !!this.required } : [];
formRules = formRules ? getPropByPath(formRules, this.prop || '').o[this.prop || ''] : [];
const prop = getPropByPath(formRules, this.prop || '');
formRules = formRules ? (prop.o[this.prop || ''] || prop.v) : [];
return [].concat(selfRules || formRules || []).concat(requiredRule);
},
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment