From ad7336d5952ad4014e28e2fc50a589d546726b1d Mon Sep 17 00:00:00 2001 From: Zaytsev Kirill Date: Mon, 26 Oct 2020 16:50:12 +0300 Subject: [PATCH] chore!: Removed errors prop from FormularioInput --- src/FormularioInput.vue | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) diff --git a/src/FormularioInput.vue b/src/FormularioInput.vue index 3f1702c..ab57b2a 100644 --- a/src/FormularioInput.vue +++ b/src/FormularioInput.vue @@ -54,8 +54,6 @@ export default class FormularioInput extends Vue { validator: behavior => Object.values(VALIDATION_BEHAVIOR).includes(behavior) }) validationBehavior!: string - @Prop({ default: () => [] }) errors!: string[] - // Affects only observing & setting of local errors @Prop({ default: false }) errorsDisabled!: boolean @@ -94,11 +92,10 @@ export default class FormularioInput extends Vue { name: this.fullQualifiedName, runValidation: this.runValidation.bind(this), violations: this.violations, - errors: this.mergedErrors, - // @TODO: Deprecated, will be removed in next versions, use context.violations & context.errors separately + errors: this.localErrors, allErrors: [ - ...this.mergedErrors.map(message => ({ rule: null, args: [], context: null, message })), - ...arrayify(this.violations) + ...this.localErrors.map(message => ({ rule: null, args: [], context: null, message })), + ...arrayify(this.violations), ], }, 'model', { get: () => this.model, @@ -124,13 +121,6 @@ export default class FormularioInput extends Vue { return messages } - /** - * These are errors we that have been explicitly passed to us. - */ - get mergedErrors (): string[] { - return [...arrayify(this.errors), ...this.localErrors] - } - /** * Determines if this formulario element is v-modeled or not. */