From 47f441a3d870fe535be59df9e4fc0b4450a78391 Mon Sep 17 00:00:00 2001 From: "Fredrick W. Warren" Date: Fri, 12 Feb 2021 15:17:25 -0800 Subject: [PATCH] 16.07 Register - Submit Form if Valid --- src/components/Auth/Register.vue | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/components/Auth/Register.vue b/src/components/Auth/Register.vue index 9222185..fa4ece0 100644 --- a/src/components/Auth/Register.vue +++ b/src/components/Auth/Register.vue @@ -17,6 +17,7 @@ class="col" label="Email" stack-label + ref="email" />
@@ -29,6 +30,7 @@ class="col" label="Password" stack-label + ref="password" />
@@ -60,7 +62,11 @@ export default { resetForm () { }, submitForm () { - console.log('Bang Bang! My baby shot me down') + this.$refs.email.validate() + this.$refs.password.validate() + if (!this.$refs.email.hasError && !this.$refs.password.hasError) { + console.log('Bang Bang') + } } } }