Form: 🔧 fixed validation issue with dynamic rules (fixed #1317)

This commit is contained in:
Hashem Qolami 2016-11-26 16:28:43 +03:30
parent 75d248e107
commit bfab5cd9ed

View File

@ -23,6 +23,11 @@
},
inline: Boolean
},
watch: {
rules() {
this.validate();
}
},
data() {
return {
fields: []
@ -54,7 +59,7 @@
if (errors) {
valid = false;
}
if (index === this.fields.length - 1) {
if (typeof callback === 'function' && index === this.fields.length - 1) {
callback(valid);
}
});