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
2 changed files with 4 additions and 4 deletions

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