chore: Migrate all instances of old vuelidate to new v2 syntax

This commit is contained in:
Fayaz Ahmed
2024-06-10 15:15:14 +05:30
parent 20b2dc8c6f
commit e0ddeb4ee6
47 changed files with 588 additions and 405 deletions
@@ -25,13 +25,13 @@
<form-input
v-model.trim="credentials.email"
name="email_address"
:has-error="$v.credentials.email.$error"
:has-error="v$.credentials.email.$error"
:error-message="$t('RESET_PASSWORD.EMAIL.ERROR')"
:placeholder="$t('RESET_PASSWORD.EMAIL.PLACEHOLDER')"
@input="$v.credentials.email.$touch"
@input="v$.credentials.email.$touch"
/>
<SubmitButton
:disabled="$v.credentials.email.$invalid || resetPassword.showLoading"
:disabled="v$.credentials.email.$invalid || resetPassword.showLoading"
:button-text="$t('RESET_PASSWORD.SUBMIT')"
:loading="resetPassword.showLoading"
/>
@@ -47,6 +47,7 @@
</template>
<script>
import { useVuelidate } from '@vuelidate/core';
import { required, minLength, email } from 'vuelidate/lib/validators';
import globalConfigMixin from 'shared/mixins/globalConfigMixin';
import { mapGetters } from 'vuex';
@@ -58,6 +59,9 @@ import alertMixin from 'shared/mixins/alertMixin';
export default {
components: { FormInput, SubmitButton },
mixins: [globalConfigMixin, alertMixin],
setup() {
return { v$: useVuelidate() };
},
data() {
return {
credentials: { email: '' },