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:
Jason Carvalho 2021-11-12 22:00:31 +05:30 committed by GitHub
parent 758ad6af8b
commit 480a0529a2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 4 deletions

View file

@ -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 () {

View file

@ -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 () {