Commit 8f623b4c authored by Leopoldthecoder's avatar Leopoldthecoder Committed by 杨奕

Form: required rule shouldn't care about model type

parent 0a23a310
......@@ -176,6 +176,7 @@ Vue.use(Radio)
Vue.use(RadioGroup)
Vue.use(RadioButton)
Vue.use(Checkbox)
Vue.use(CheckboxButton)
Vue.use(CheckboxGroup)
Vue.use(Switch)
Vue.use(Select)
......
......@@ -176,6 +176,7 @@ Vue.use(Radio)
Vue.use(RadioGroup)
Vue.use(RadioButton)
Vue.use(Checkbox)
Vue.use(CheckboxButton)
Vue.use(CheckboxGroup)
Vue.use(Switch)
Vue.use(Select)
......
......@@ -176,6 +176,11 @@
this.validateState = 'validating';
var descriptor = {};
if (rules && rules.length > 0) {
rules.forEach(rule => {
delete rule.trigger;
});
}
descriptor[this.prop] = rules;
var validator = new AsyncValidator(descriptor);
......
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