mirror of
https://github.com/sudoxnym/habitica-self-host.git
synced 2026-07-13 17:52:22 +00: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:
parent
758ad6af8b
commit
480a0529a2
2 changed files with 4 additions and 4 deletions
|
|
@ -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 () {
|
||||
|
|
|
|||
Loading…
Reference in a new issue