mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-18 15:17:25 +01:00
Fix logic of emailInvalid and emailValid (#13614)
Fix email validation to return invalid even when 3 characters or less are present in the input field.
This commit is contained in:
@@ -685,11 +685,11 @@ export default {
|
||||
return false;
|
||||
},
|
||||
emailValid () {
|
||||
if (this.email.length <= 3) return false;
|
||||
if (this.email.length < 1) return false;
|
||||
return isEmail(this.email);
|
||||
},
|
||||
emailInvalid () {
|
||||
if (this.email.length <= 3) return false;
|
||||
if (this.email.length < 1) return false;
|
||||
return !this.emailValid;
|
||||
},
|
||||
usernameValid () {
|
||||
|
||||
@@ -841,11 +841,11 @@ export default {
|
||||
},
|
||||
computed: {
|
||||
emailValid () {
|
||||
if (this.email.length <= 3) return false;
|
||||
if (this.email.length < 1) return false;
|
||||
return isEmail(this.email);
|
||||
},
|
||||
emailInvalid () {
|
||||
if (this.email.length <= 3) return false;
|
||||
if (this.email.length < 1) return false;
|
||||
return !isEmail(this.email);
|
||||
},
|
||||
usernameValid () {
|
||||
|
||||
Reference in New Issue
Block a user