From 20adf407f004b715f318264aca7b448fb8928244 Mon Sep 17 00:00:00 2001 From: Matthieu Bessat Date: Wed, 2 Sep 2020 22:11:09 +0200 Subject: [PATCH] refactor: delete useless HelloWorld component --- src/components/HelloWorld.vue | 153 ---------------------------------- src/router/index.ts | 4 - src/store/index.ts | 8 +- 3 files changed, 4 insertions(+), 161 deletions(-) delete mode 100644 src/components/HelloWorld.vue diff --git a/src/components/HelloWorld.vue b/src/components/HelloWorld.vue deleted file mode 100644 index ff173ff..0000000 --- a/src/components/HelloWorld.vue +++ /dev/null @@ -1,153 +0,0 @@ - - - diff --git a/src/router/index.ts b/src/router/index.ts index 78eeb20..ac631dd 100644 --- a/src/router/index.ts +++ b/src/router/index.ts @@ -13,12 +13,8 @@ const routes: Array = [ { path: '/about', name: 'About', - // route level code-splitting - // this generates a separate chunk (about.[hash].js) for this route - // which is lazy-loaded when the route is visited. component: () => import(/* webpackChunkName: "about" */ '../views/About.vue') }, - { path: '/admin', component: () => import(/* webpackChunkName: "adminLayout" */ '../layouts/Admin.vue'), diff --git a/src/store/index.ts b/src/store/index.ts index 5d9ea03..59ba3ed 100644 --- a/src/store/index.ts +++ b/src/store/index.ts @@ -68,12 +68,12 @@ const defaultState: State = { validateMainCallback: (d = false) => d, mainRules: { name: [ - (v: any) => v.length >= 3 || 'Au minimum 3 caractères', - (v: any) => v.length <= 50 || 'Au maximum 50 caractères' + (v: any) => (v != null && v.length >= 3) || 'Au minimum 3 caractères', + (v: any) => (v != null && v.length <= 50) || 'Au maximum 50 caractères' ], descriptionShort: [ - (v: any) => v.length >= 20 || 'Au minimum 20 caractères', - (v: any) => v.length <= 200 || 'Au maximum 200 caractères' + (v: any) => (v != null && v.length) >= 20 || 'Au minimum 20 caractères', + (v: any) => (v != null && v.length) <= 200 || 'Au maximum 200 caractères' ], tags: [(v: any) => (Array.isArray(v) && v.length > 0) || 'Vous devez choisir au minimum une catégorie'], 'contacts.email': [(v: any) => /.+@.+\..+/.test(v) || "L'email est requis et doit être valide"],