Skip to content

Commit bec971b

Browse files
committed
完善test.emial验证方法
1 parent 29fd0a3 commit bec971b

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

uview-ui/libs/function/test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* 验证电子邮箱格式
33
*/
44
function email(value) {
5-
return /^\w+((-\w+)|(\.\w+))*\@[A-Za-z0-9]+((\.|-)[A-Za-z0-9]+)*\.[A-Za-z0-9]+$/.test(value);
5+
return /[\w!#$%&'*+/=?^_`{|}~-]+(?:\.[\w!#$%&'*+/=?^_`{|}~-]+)*@(?:[\w](?:[\w-]*[\w])?\.)+[\w](?:[\w-]*[\w])?/.test(value);
66
}
77

88
/**

uview-ui/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "uview-ui",
3-
"version": "1.8.3",
3+
"version": "1.8.4",
44
"description": "uView UI,是uni-app生态优秀的UI框架,全面的组件和便捷的工具会让您信手拈来,如鱼得水",
55
"main": "index.js",
66
"keywords": [

0 commit comments

Comments
 (0)