mirror of https://github.com/ElemeFE/element
Form: required rule shouldn't care about model type
parent
0a23a310e4
commit
8f623b4cc4
|
@ -176,6 +176,7 @@ Vue.use(Radio)
|
||||||
Vue.use(RadioGroup)
|
Vue.use(RadioGroup)
|
||||||
Vue.use(RadioButton)
|
Vue.use(RadioButton)
|
||||||
Vue.use(Checkbox)
|
Vue.use(Checkbox)
|
||||||
|
Vue.use(CheckboxButton)
|
||||||
Vue.use(CheckboxGroup)
|
Vue.use(CheckboxGroup)
|
||||||
Vue.use(Switch)
|
Vue.use(Switch)
|
||||||
Vue.use(Select)
|
Vue.use(Select)
|
||||||
|
|
|
@ -176,6 +176,7 @@ Vue.use(Radio)
|
||||||
Vue.use(RadioGroup)
|
Vue.use(RadioGroup)
|
||||||
Vue.use(RadioButton)
|
Vue.use(RadioButton)
|
||||||
Vue.use(Checkbox)
|
Vue.use(Checkbox)
|
||||||
|
Vue.use(CheckboxButton)
|
||||||
Vue.use(CheckboxGroup)
|
Vue.use(CheckboxGroup)
|
||||||
Vue.use(Switch)
|
Vue.use(Switch)
|
||||||
Vue.use(Select)
|
Vue.use(Select)
|
||||||
|
|
|
@ -176,6 +176,11 @@
|
||||||
this.validateState = 'validating';
|
this.validateState = 'validating';
|
||||||
|
|
||||||
var descriptor = {};
|
var descriptor = {};
|
||||||
|
if (rules && rules.length > 0) {
|
||||||
|
rules.forEach(rule => {
|
||||||
|
delete rule.trigger;
|
||||||
|
});
|
||||||
|
}
|
||||||
descriptor[this.prop] = rules;
|
descriptor[this.prop] = rules;
|
||||||
|
|
||||||
var validator = new AsyncValidator(descriptor);
|
var validator = new AsyncValidator(descriptor);
|
||||||
|
|
Loading…
Reference in New Issue