Skip to content

Commit a515f2a

Browse files
forrestsworkNataliaTepluhina
authored andcommitted
removes useless escape characters from email regex (#2426)
the existing example throws an error with default Vue eslint
1 parent 505f9b1 commit a515f2a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/v2/cookbook/form-validation.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@ const app = new Vue({
206206
e.preventDefault();
207207
},
208208
validEmail: function (email) {
209-
var re = /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;
209+
var re = /^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;
210210
return re.test(email);
211211
}
212212
}

0 commit comments

Comments
 (0)