From 9a344bf8b52f1889fcc93a253b08de5c360e5873 Mon Sep 17 00:00:00 2001 From: Zaytsev Kirill Date: Tue, 25 May 2021 13:59:01 +0300 Subject: [PATCH] feat!: FormularioField - individual field errors are always presumed as a string array --- src/FormularioField.vue | 2 +- test/unit/FormularioFieldGroup.test.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/FormularioField.vue b/src/FormularioField.vue index 94c4a36..b628571 100644 --- a/src/FormularioField.vue +++ b/src/FormularioField.vue @@ -243,7 +243,7 @@ export default class FormularioField extends Vue { */ public setErrors (errors: string[]): void { if (!this.errorsDisabled) { - this.localErrors = arrayify(errors) as string[] + this.localErrors = errors } } diff --git a/test/unit/FormularioFieldGroup.test.js b/test/unit/FormularioFieldGroup.test.js index 0dd842f..3851b4a 100644 --- a/test/unit/FormularioFieldGroup.test.js +++ b/test/unit/FormularioFieldGroup.test.js @@ -83,7 +83,7 @@ describe('FormularioFieldGroup', () => { test('errors are set for grouped fields', async () => { const wrapper = mount(FormularioForm, { - propsData: { fieldsErrors: { 'address.street': 'Test error' } }, + propsData: { fieldsErrors: { 'address.street': ['Test error'] } }, slots: { default: `