Form: required rule shouldn't care about model type

pull/8405/head
Leopoldthecoder 2017-11-20 22:19:04 +08:00 committed by 杨奕
parent 0a23a310e4
commit 8f623b4cc4
3 changed files with 7 additions and 0 deletions

View File

@ -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)

View File

@ -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)

View File

@ -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);