Skip to content

Commit a263d70

Browse files
authored
wings. improved email syntax check (#144)
1 parent 3b6b2dd commit a263d70

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

wings/src/components/others/EmailPage.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,7 @@ export default {
250250
getCode: function(reset) {
251251
this.errors.badMail = false;
252252
this.bannerShow = true;
253-
if (this.authEmail.indexOf("@") == -1) {
253+
if (!/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,})+$/.test(this.authEmail.toLowerCase())) {
254254
this.errors.badInput = true;
255255
return;
256256
}
@@ -551,4 +551,4 @@ a {
551551
.pw-input {
552552
width: 75% !important;
553553
}
554-
</style>
554+
</style>

0 commit comments

Comments
 (0)