import { defineRule } from 'vee-validate' import { defineNuxtPlugin } from '#app' export default defineNuxtPlugin((nuxtApp) => { const { t } = nuxtApp.$i18n defineRule('password', (value) => { if (value.length < 8) return t('validation.password') const uppercaseRegex = /[A-Z]/ const digitRegex = /\d/ const specialCharRegex = /[!@#$%^&*()_+\-=\[\]{};':"\\|,.<>\/?]/ if ( !uppercaseRegex.test(value) || !digitRegex.test(value) || !specialCharRegex.test(value) ) return t('validation.password') return true }) })