diff --git a/app/javascript/v3/views/auth/signup/components/Signup/Form.vue b/app/javascript/v3/views/auth/signup/components/Signup/Form.vue index 6636d1e98..9cffea18d 100644 --- a/app/javascript/v3/views/auth/signup/components/Signup/Form.vue +++ b/app/javascript/v3/views/auth/signup/components/Signup/Form.vue @@ -85,10 +85,10 @@ export default { if (!password.$error) { return ''; } - if (!password.minLength) { + if (password.minLength.$invalid) { return this.$t('REGISTER.PASSWORD.ERROR'); } - if (!password.isValidPassword) { + if (password.isValidPassword.$invalid) { return this.$t('REGISTER.PASSWORD.IS_INVALID_PASSWORD'); } return ''; @@ -96,6 +96,9 @@ export default { showGoogleOAuth() { return Boolean(window.chatwootConfig.googleOAuthClientId); }, + isFormValid() { + return !this.v$.$invalid && this.hasAValidCaptcha; + }, }, methods: { async submit() { @@ -120,6 +123,7 @@ export default { onRecaptchaVerified(token) { this.credentials.hCaptchaClientResponse = token; this.didCaptchaReset = false; + this.v$.$touch(); }, resetCaptcha() { if (!this.globalConfig.hCaptchaSiteKey) { @@ -198,7 +202,7 @@ export default {