From a010d91da22888827154eb049f1272a21d923b5d Mon Sep 17 00:00:00 2001 From: James Collins Date: Thu, 27 Jul 2023 21:59:17 +1000 Subject: [PATCH] show error --- resources/js/views/EmailVerify.vue | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/resources/js/views/EmailVerify.vue b/resources/js/views/EmailVerify.vue index 38b77cf..5a2547f 100644 --- a/resources/js/views/EmailVerify.vue +++ b/resources/js/views/EmailVerify.vue @@ -22,7 +22,7 @@ - @@ -50,10 +65,11 @@ import SMLoading from "../components/SMLoading.vue"; // const { executeRecaptcha, recaptchaLoaded } = useReCaptcha(); const formDone = ref(false); +const formError = ref(false); let form = reactive( Form({ code: FormControl("", And([Required(), Min(6), Max(6)])), - }) + }), ); const handleSubmit = async () => { @@ -73,6 +89,7 @@ const handleSubmit = async () => { formDone.value = true; } catch (error) { + formError.value = true; form.apiErrors(error, (message) => { useToastStore().addToast({ title: "An error occurred",