change const form to let form

This commit is contained in:
2023-03-13 20:01:30 +10:00
parent ac45a6b5ef
commit 09376e8f98
15 changed files with 15 additions and 15 deletions

View File

@@ -131,7 +131,7 @@ import { Form, FormControl } from "../helpers/form";
import { And, Email, Min, Required } from "../helpers/validate"; import { And, Email, Min, Required } from "../helpers/validate";
const { executeRecaptcha, recaptchaLoaded } = useReCaptcha(); const { executeRecaptcha, recaptchaLoaded } = useReCaptcha();
const form = reactive( let form = reactive(
Form({ Form({
name: FormControl("", And([Required()])), name: FormControl("", And([Required()])),
email: FormControl("", And([Required(), Email()])), email: FormControl("", And([Required(), Email()])),

View File

@@ -54,7 +54,7 @@ import { And, Max, Min, Required } from "../helpers/validate";
const { executeRecaptcha, recaptchaLoaded } = useReCaptcha(); const { executeRecaptcha, recaptchaLoaded } = useReCaptcha();
const formDone = ref(false); const formDone = ref(false);
const form = reactive( let form = reactive(
Form({ Form({
code: FormControl("", And([Required(), Min(6), Max(6)])), code: FormControl("", And([Required(), Min(6), Max(6)])),
}) })

View File

@@ -60,7 +60,7 @@ import { And, Min, Required } from "../helpers/validate";
const { executeRecaptcha, recaptchaLoaded } = useReCaptcha(); const { executeRecaptcha, recaptchaLoaded } = useReCaptcha();
const formDone = ref(false); const formDone = ref(false);
const form = reactive( let form = reactive(
Form({ Form({
username: FormControl("", And([Required(), Min(4)])), username: FormControl("", And([Required(), Min(4)])),
}) })

View File

@@ -59,7 +59,7 @@ import { And, Email, Required } from "../helpers/validate";
const { executeRecaptcha, recaptchaLoaded } = useReCaptcha(); const { executeRecaptcha, recaptchaLoaded } = useReCaptcha();
const formDone = ref(false); const formDone = ref(false);
const form = reactive( let form = reactive(
Form({ Form({
email: FormControl("", And([Required(), Email()])), email: FormControl("", And([Required(), Email()])),
}) })

View File

@@ -141,7 +141,7 @@ import { And, Email, Required } from "../helpers/validate";
const slides = ref([]); const slides = ref([]);
const { executeRecaptcha, recaptchaLoaded } = useReCaptcha(); const { executeRecaptcha, recaptchaLoaded } = useReCaptcha();
const form = reactive( let form = reactive(
Form({ Form({
email: FormControl("", And([Required(), Email()])), email: FormControl("", And([Required(), Email()])),
}) })

View File

@@ -48,7 +48,7 @@ import { useUserStore } from "../store/UserStore";
const router = useRouter(); const router = useRouter();
const userStore = useUserStore(); const userStore = useUserStore();
const form = reactive( let form = reactive(
Form({ Form({
username: FormControl("", And([Required(), Min(4)])), username: FormControl("", And([Required(), Min(4)])),
password: FormControl("", Required()), password: FormControl("", Required()),

View File

@@ -123,7 +123,7 @@ const checkUsername = async (value: string): Promise<boolean | string> => {
const formDone = ref(false); const formDone = ref(false);
const lastUsernameCheck = ref(""); const lastUsernameCheck = ref("");
const form = reactive( let form = reactive(
Form({ Form({
first_name: FormControl("", Required()), first_name: FormControl("", Required()),
last_name: FormControl("", Required()), last_name: FormControl("", Required()),

View File

@@ -56,7 +56,7 @@ import { Required } from "../helpers/validate";
const { executeRecaptcha, recaptchaLoaded } = useReCaptcha(); const { executeRecaptcha, recaptchaLoaded } = useReCaptcha();
const formDone = ref(false); const formDone = ref(false);
const form = reactive( let form = reactive(
Form({ Form({
username: FormControl("", Required()), username: FormControl("", Required()),
}) })

View File

@@ -56,7 +56,7 @@ import { And, Max, Min, Password, Required } from "../helpers/validate";
const { executeRecaptcha, recaptchaLoaded } = useReCaptcha(); const { executeRecaptcha, recaptchaLoaded } = useReCaptcha();
const formDone = ref(false); const formDone = ref(false);
const form = reactive( let form = reactive(
Form({ Form({
code: FormControl("", And([Required(), Min(6), Max(6)])), code: FormControl("", And([Required(), Min(6), Max(6)])),
password: FormControl("", And([Required(), Password()])), password: FormControl("", And([Required(), Password()])),

View File

@@ -49,7 +49,7 @@ import { And, Email, Required } from "../helpers/validate";
const { executeRecaptcha, recaptchaLoaded } = useReCaptcha(); const { executeRecaptcha, recaptchaLoaded } = useReCaptcha();
const formDone = ref(false); const formDone = ref(false);
const form = reactive( let form = reactive(
Form({ Form({
email: FormControl("", And([Required(), Email()])), email: FormControl("", And([Required(), Email()])),
}) })

View File

@@ -30,7 +30,7 @@ import { Form, FormControl } from "../../helpers/form";
import { And, Min, Required } from "../../helpers/validate"; import { And, Min, Required } from "../../helpers/validate";
const route = useRoute(); const route = useRoute();
const form = reactive( let form = reactive(
Form({ Form({
title: FormControl("", And([Required(), Min(2)])), title: FormControl("", And([Required(), Min(2)])),
content: FormControl("", Required()), content: FormControl("", Required()),

View File

@@ -196,7 +196,7 @@ const registration_data = computed(() => {
return data; return data;
}); });
const form = reactive( let form = reactive(
Form({ Form({
title: FormControl("", And([Required(), Min(6)])), title: FormControl("", And([Required(), Min(6)])),
location: FormControl("online"), location: FormControl("online"),

View File

@@ -81,7 +81,7 @@ const formLoadingMessage = ref("");
const route = useRoute(); const route = useRoute();
const page_title = route.params.id ? "Edit Media" : "Upload Media"; const page_title = route.params.id ? "Edit Media" : "Upload Media";
const form = reactive( let form = reactive(
Form({ Form({
file: FormControl("", And([Required(), FileSize(5242880)])), file: FormControl("", And([Required(), FileSize(5242880)])),
permission: FormControl(), permission: FormControl(),

View File

@@ -89,7 +89,7 @@ let pageError = ref(200);
const authors = ref({}); const authors = ref({});
const attachments = ref([]); const attachments = ref([]);
const form = reactive( let form = reactive(
Form({ Form({
title: FormControl("", And([Required(), Min(8)])), title: FormControl("", And([Required(), Min(8)])),
slug: FormControl("", And([Required(), Min(6)])), slug: FormControl("", And([Required(), Min(6)])),

View File

@@ -48,7 +48,7 @@ import { useUserStore } from "../../store/UserStore";
const route = useRoute(); const route = useRoute();
const userStore = useUserStore(); const userStore = useUserStore();
const form = reactive( let form = reactive(
Form({ Form({
first_name: FormControl("", And([Required()])), first_name: FormControl("", And([Required()])),
last_name: FormControl("", And([Required()])), last_name: FormControl("", And([Required()])),