mirror of https://github.com/rancher/dashboard.git
Emit validation status for `labeled-form-element` mixin
Signed-off-by: Phillip Rak <rak.phillip@gmail.com>
This commit is contained in:
parent
b9bca4f69c
commit
87f9eede21
|
|
@ -155,6 +155,8 @@ export default Vue.extend({
|
||||||
const message = requiredRule(value);
|
const message = requiredRule(value);
|
||||||
|
|
||||||
if (!!message) {
|
if (!!message) {
|
||||||
|
this.$emit('update:validation', false);
|
||||||
|
|
||||||
return message;
|
return message;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -167,8 +169,12 @@ export default Vue.extend({
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (ruleMessages.length > 0 && (this.blurred || this.focused || !this.requireDirty)) {
|
if (ruleMessages.length > 0 && (this.blurred || this.focused || !this.requireDirty)) {
|
||||||
|
this.$emit('update:validation', false);
|
||||||
|
|
||||||
return ruleMessages.join(', ');
|
return ruleMessages.join(', ');
|
||||||
} else {
|
} else {
|
||||||
|
this.$emit('update:validation', true);
|
||||||
|
|
||||||
return undefined;
|
return undefined;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue