mirror of
https://github.com/sudoxnym/habitica.git
synced 2026-04-14 19:56:23 +00:00
refactor(auth): only import needed validator module
This commit is contained in:
parent
b54f031acd
commit
dc46127fc7
3 changed files with 7 additions and 7 deletions
|
|
@ -82,7 +82,7 @@
|
|||
import hello from 'hellojs';
|
||||
import { setUpAxios } from 'client/libs/auth';
|
||||
import debounce from 'lodash/debounce';
|
||||
import validator from 'validator';
|
||||
import isEmail from 'validator/lib/isEmail';
|
||||
|
||||
import facebookSquareIcon from 'assets/svg/facebook-square.svg';
|
||||
import googleIcon from 'assets/svg/google.svg';
|
||||
|
|
@ -116,7 +116,7 @@ export default {
|
|||
computed: {
|
||||
emailValid () {
|
||||
if (this.email.length <= 3) return false;
|
||||
return validator.isEmail(this.email);
|
||||
return isEmail(this.email);
|
||||
},
|
||||
emailInvalid () {
|
||||
return !this.emailValid;
|
||||
|
|
|
|||
|
|
@ -295,7 +295,7 @@
|
|||
import axios from 'axios';
|
||||
import hello from 'hellojs';
|
||||
import debounce from 'lodash/debounce';
|
||||
import validator from 'validator';
|
||||
import isEmail from 'validator/lib/isEmail';
|
||||
|
||||
import gryphon from 'assets/svg/gryphon.svg';
|
||||
import habiticaIcon from 'assets/svg/habitica-logo.svg';
|
||||
|
|
@ -341,7 +341,7 @@ export default {
|
|||
},
|
||||
emailValid () {
|
||||
if (this.email.length <= 3) return false;
|
||||
return validator.isEmail(this.email);
|
||||
return isEmail(this.email);
|
||||
},
|
||||
emailInvalid () {
|
||||
if (this.email.length <= 3) return false;
|
||||
|
|
|
|||
|
|
@ -560,7 +560,7 @@
|
|||
<script>
|
||||
import hello from 'hellojs';
|
||||
import debounce from 'lodash/debounce';
|
||||
import validator from 'validator';
|
||||
import isEmail from 'validator/lib/isEmail';
|
||||
import googlePlay from 'assets/images/home/google-play-badge.svg';
|
||||
import iosAppStore from 'assets/images/home/ios-app-store.svg';
|
||||
import iphones from 'assets/images/home/iphones.svg';
|
||||
|
|
@ -627,11 +627,11 @@
|
|||
computed: {
|
||||
emailValid () {
|
||||
if (this.email.length <= 3) return false;
|
||||
return validator.isEmail(this.email);
|
||||
return isEmail(this.email);
|
||||
},
|
||||
emailInvalid () {
|
||||
if (this.email.length <= 3) return false;
|
||||
return !validator.isEmail(this.email);
|
||||
return !isEmail(this.email);
|
||||
},
|
||||
usernameValid () {
|
||||
if (this.username.length < 1) return false;
|
||||
|
|
|
|||
Loading…
Reference in a new issue