From 5557c57252ec5c9dcf1529236d04dd516e13fc75 Mon Sep 17 00:00:00 2001 From: ljf Date: Fri, 27 Aug 2021 20:17:34 +0200 Subject: [PATCH] [enh] display errors if pattern doesn't match --- app/src/components/globals/FormField.vue | 1 + app/src/components/globals/formItems/InputItem.vue | 3 ++- app/src/helpers/yunohostArguments.js | 9 ++++++++- app/src/i18n/locales/en.json | 4 +++- 4 files changed, 14 insertions(+), 3 deletions(-) diff --git a/app/src/components/globals/FormField.vue b/app/src/components/globals/FormField.vue index dca90927..49cdcee6 100644 --- a/app/src/components/globals/FormField.vue +++ b/app/src/components/globals/FormField.vue @@ -103,6 +103,7 @@ export default { const validation = this.validation if (validation && validation.$anyError) { const [type, errData] = this.findError(validation.$params, validation) + console.log(type, errData) return this.$i18n.t('form_errors.' + type, errData) } return '' diff --git a/app/src/components/globals/formItems/InputItem.vue b/app/src/components/globals/formItems/InputItem.vue index 9e6cdfc2..e9c95a1a 100644 --- a/app/src/components/globals/formItems/InputItem.vue +++ b/app/src/components/globals/formItems/InputItem.vue @@ -17,6 +17,7 @@