1
0
mirror of synced 2024-11-26 07:16:02 +03:00

chore!: Removed errors prop from FormularioInput

This commit is contained in:
Zaytsev Kirill 2020-10-26 16:50:12 +03:00
parent dba96a2fb2
commit ad7336d595

View File

@ -54,8 +54,6 @@ export default class FormularioInput extends Vue {
validator: behavior => Object.values(VALIDATION_BEHAVIOR).includes(behavior) validator: behavior => Object.values(VALIDATION_BEHAVIOR).includes(behavior)
}) validationBehavior!: string }) validationBehavior!: string
@Prop({ default: () => [] }) errors!: string[]
// Affects only observing & setting of local errors // Affects only observing & setting of local errors
@Prop({ default: false }) errorsDisabled!: boolean @Prop({ default: false }) errorsDisabled!: boolean
@ -94,11 +92,10 @@ export default class FormularioInput extends Vue {
name: this.fullQualifiedName, name: this.fullQualifiedName,
runValidation: this.runValidation.bind(this), runValidation: this.runValidation.bind(this),
violations: this.violations, violations: this.violations,
errors: this.mergedErrors, errors: this.localErrors,
// @TODO: Deprecated, will be removed in next versions, use context.violations & context.errors separately
allErrors: [ allErrors: [
...this.mergedErrors.map(message => ({ rule: null, args: [], context: null, message })), ...this.localErrors.map(message => ({ rule: null, args: [], context: null, message })),
...arrayify(this.violations) ...arrayify(this.violations),
], ],
}, 'model', { }, 'model', {
get: () => this.model, get: () => this.model,
@ -124,13 +121,6 @@ export default class FormularioInput extends Vue {
return messages 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. * Determines if this formulario element is v-modeled or not.
*/ */