before liquid glass
This commit is contained in:
@@ -192,14 +192,13 @@
|
||||
<script setup lang="ts">
|
||||
import { ref, computed } from 'vue'
|
||||
import type { AxiosError } from 'axios'
|
||||
import { useI18n } from "vue-i18n"
|
||||
import { QInput } from 'quasar'
|
||||
import { useAuthStore } from 'stores/auth'
|
||||
import { useInputRules } from 'composables/useInputRules'
|
||||
|
||||
const { t } = useI18n()
|
||||
const { inputRules } = useInputRules()
|
||||
const authStore = useAuthStore()
|
||||
|
||||
type ValidationRule = (val: string) => boolean | string
|
||||
type Step = 1 | 2 | 3 | 4 | 5
|
||||
|
||||
const step = ref<Step>(1)
|
||||
@@ -211,8 +210,8 @@
|
||||
const showSuccessOverlay = ref(false)
|
||||
const isPwd = ref<boolean>(true)
|
||||
const validationRules = {
|
||||
email: [(val: string) => /.+@.+\..+/.test(val) || t('login__incorrect_email')] as [ValidationRule],
|
||||
password: [(val: string) => val.length >= 8 || t('login__password_require')] as [ValidationRule]
|
||||
email: [inputRules.email],
|
||||
password: [inputRules.password]
|
||||
}
|
||||
|
||||
const isEmailValid = computed(() =>
|
||||
@@ -224,7 +223,7 @@
|
||||
)
|
||||
|
||||
const passwordHint = computed(() => {
|
||||
const result = validationRules.password[0](password.value)
|
||||
const result = validationRules.password[0] ? validationRules.password[0](password.value) : null
|
||||
return typeof result === 'string' ? result : ''
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user