Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
({ $pending, $model }) => $pending ? 'Checking!' : `Error! ${$model} Isn’t "aaaa"`,
asyncValidator
),
$autoDirty: true
},
repeatPassword: {
required,
sameAs: withMessage(
({ $params }) => $t('errors.sameAs', $params.equalTo),
sameAs(password)
),
$autoDirty: true
}
}
const $v = useVuelidate(
rules, { password, repeatPassword }, 'usePassword'
)
return {
$v,
password,
repeatPassword,
rules
}
}
const keyLength = ref(3)
const user = reactive({
firstName: '',
lastName: ''
})
const userRules = {
hasKeys: withMessage(
({ $params }) => `Should have exactly ${$params.keys} keys.`,
hasKeysWithParams(keyLength)
),
firstName: { required },
lastName: { required }
}
const $vUser = useVuelidate({ user: userRules }, { user }, 'useUser')
return { password, repeatPassword, $v, minimumLength, $vUser, keyLength }
}
}