fast-element-plus 2.0.12 → 2.0.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -2,6 +2,13 @@
2
2
 
3
3
  All notable changes to Fast.Element.Plus are documented in this file.
4
4
 
5
+ ## [2.0.13] - 2026-09-04
6
+
7
+ ### Changed
8
+
9
+ - Tightened mainland China mobile-number validation and expanded email validation to support standard local-part characters and general top-level domains.
10
+ - Added medium-password, six-digit verification-code, and four-character image-CAPTCHA regular expressions, and disallowed whitespace in medium and strong passwords.
11
+
5
12
  ## [2.0.12] - 2026-09-03
6
13
 
7
14
  ### Changed
@@ -136,6 +143,7 @@ All notable changes to Fast.Element.Plus are documented in this file.
136
143
  - Scoped Table styles and added responsive IconSelector styling.
137
144
  - Improved dialogs, drawers, tables, forms, trees, selectors, car-number input, images, and uploads for dark mode, touch input, and narrow viewports.
138
145
 
146
+ [2.0.13]: https://gitee.com/FastDotnet/fast.element.plus/releases/tag/v2.0.13
139
147
  [2.0.12]: https://gitee.com/FastDotnet/fast.element.plus/releases/tag/v2.0.12
140
148
  [2.0.11]: https://gitee.com/FastDotnet/fast.element.plus/releases/tag/v2.0.11
141
149
  [2.0.10]: https://gitee.com/FastDotnet/fast.element.plus/releases/tag/v2.0.10
@@ -58,11 +58,15 @@ export declare const RegExps: {
58
58
  */
59
59
  Account: RegExp;
60
60
  /**
61
- * 弱密码(只包含字母和数字,长度为618位)
61
+ * 弱密码(6~18位,仅包含字母和数字)
62
62
  */
63
63
  Password: RegExp;
64
64
  /**
65
- * 强密码(820位,包含大小写字母、数字及特殊字符)
65
+ * 中密码(8~20位,必须包含大小写字母、数字)
66
+ */
67
+ MediumPassword: RegExp;
68
+ /**
69
+ * 强密码(8~20位,必须包含大小写字母、数字及特殊字符)
66
70
  */
67
71
  StrongPassword: RegExp;
68
72
  /**
@@ -73,4 +77,12 @@ export declare const RegExps: {
73
77
  * 英文字符
74
78
  */
75
79
  English: RegExp;
80
+ /**
81
+ * 验证码6位
82
+ */
83
+ VerificationCode: RegExp;
84
+ /**
85
+ * 图片验证码4位
86
+ */
87
+ ImageCaptchaCode: RegExp;
76
88
  };
@@ -8,7 +8,7 @@ const RegExps = {
8
8
  /**
9
9
  * 手机号
10
10
  */
11
- Mobile: /^(?:(?:\+|00)86)?1\d{10}$/,
11
+ Mobile: /^1[3-9]\d{9}$/,
12
12
  /**
13
13
  * 电话
14
14
  */
@@ -16,7 +16,7 @@ const RegExps = {
16
16
  /**
17
17
  * 邮箱
18
18
  */
19
- Email: /^[\w-]+@([a-zA-Z0-9]+\.)+(com|cn|net|org)$/,
19
+ Email: /^[A-Za-z0-9._%+-]+@(?:[A-Za-z0-9](?:[A-Za-z0-9-]*[A-Za-z0-9])?\.)+[A-Za-z]{2,}$/,
20
20
  /**
21
21
  * 身份证
22
22
  */
@@ -59,13 +59,17 @@ const RegExps = {
59
59
  */
60
60
  Account: /^[a-z][a-z\d]{5,19}$/i,
61
61
  /**
62
- * 弱密码(只包含字母和数字,长度为618位)
62
+ * 弱密码(6~18位,仅包含字母和数字)
63
63
  */
64
64
  Password: /^[A-Z0-9]{6,18}$/i,
65
65
  /**
66
- * 强密码(820位,包含大小写字母、数字及特殊字符)
66
+ * 中密码(8~20位,必须包含大小写字母、数字)
67
67
  */
68
- StrongPassword: /^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[\W_])[\s\S]{8,20}$/,
68
+ MediumPassword: /^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)\S{8,20}$/,
69
+ /**
70
+ * 强密码(8~20位,必须包含大小写字母、数字及特殊字符)
71
+ */
72
+ StrongPassword: /^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[^\w\s])\S{8,20}$/,
69
73
  /**
70
74
  * 中文字符
71
75
  */
@@ -73,7 +77,15 @@ const RegExps = {
73
77
  /**
74
78
  * 英文字符
75
79
  */
76
- English: /^[a-z]+$/i
80
+ English: /^[a-z]+$/i,
81
+ /**
82
+ * 验证码6位
83
+ */
84
+ VerificationCode: /^[0-9]{6}$/,
85
+ /**
86
+ * 图片验证码4位
87
+ */
88
+ ImageCaptchaCode: /^[A-Za-z0-9]{4}$/
77
89
  };
78
90
  //#endregion
79
91
  export { RegExps };
@@ -1 +1 @@
1
- {"version":3,"file":"regex.mjs","names":[],"sources":["../../src/constants/regex.ts"],"sourcesContent":["/** Fast 业务表单和输入组件共享的正则表达式集合。 */\nexport const RegExps = {\n\t/**\n\t * UUID\n\t */\n\tUUID: /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i,\n\t/**\n\t * 手机号\n\t */\n\tMobile: /^(?:(?:\\+|00)86)?1\\d{10}$/,\n\t/**\n\t * 电话\n\t */\n\tPhone: /^(?:(?:\\d{3}-)?\\d{8}|(?:\\d{4}-)?\\d{7,8})(?:-\\d+)?$/,\n\t/**\n\t * 邮箱\n\t */\n\tEmail: /^[\\w-]+@([a-zA-Z0-9]+\\.)+(com|cn|net|org)$/,\n\t/**\n\t * 身份证\n\t */\n\tIdCard: /(^[1-9]\\d{5}(18|19|([23]\\d))\\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\\d{3}[0-9X]$)|(^[1-9]\\d{7}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\\d{2}[0-9X]$)/i,\n\t/**\n\t * 外部链接\n\t * 匹配http、https、mailto、tel和ftp开头的链接\n\t */\n\tExternal: /^(https?:|mailto:|tel:|ftp:)/,\n\t/**\n\t * Url\n\t */\n\tUrl: /^(https?|ftp):\\/\\/([a-zA-Z0-9.-]+(:[a-zA-Z0-9.&%$-]+)*@)*((25[0-5]|2[0-4]\\d|1\\d{2}|[1-9]\\d?)(\\.(25[0-5]|2[0-4]\\d|1\\d{2}|[1-9]?\\d)){3}|([a-zA-Z0-9-]+\\.)*[a-zA-Z0-9-]+\\.(com|edu|gov|int|mil|net|org|biz|arpa|info|name|pro|aero|coop|museum|[a-zA-Z]{2}))(:\\d+)*(\\/($|[\\w.,?'\\\\+&%$#=~-]+))*$/,\n\t/**\n\t * 车牌号\n\t */\n\tCarNumber: /^[京津冀晋蒙辽吉黑沪苏浙皖闽赣鲁豫鄂湘粤桂琼渝川贵云藏陕甘青宁新军使领][A-HJ-Z][A-HJ-NP-Z0-9]{4}[A-HJ-NP-Z0-9挂学警港澳]$/,\n\t/**\n\t * 新能源车牌号\n\t */\n\tNewEnergyCarNumber:\n\t\t/^[京津冀晋蒙辽吉黑沪苏浙皖闽赣鲁豫鄂湘粤桂琼渝川贵云藏陕甘青宁新军使领][A-HJ-Z]((\\d{5}[DF]$)|([A-E][A-HJ-NP-Z0-9]\\d{3}[0-9挂学警港澳]$)|([FGHJK][A-HJ-NP-Z0-9]\\d{3}[0-9挂学警港澳]$))/,\n\t/**\n\t * 邮政编码\n\t */\n\tPostCode: /^[1-9]\\d{5}$/,\n\t/**\n\t * ipv4\n\t */\n\tIpv4: /^([01]?\\d{1,2}|2[0-4]\\d|25[0-5])\\.([01]?\\d{1,2}|2[0-4]\\d|25[0-5])\\.([01]?\\d{1,2}|2[0-4]\\d|25[0-5])\\.([01]?\\d{1,2}|2[0-4]\\d|25[0-5])$/,\n\t/**\n\t * 护照\n\t */\n\tPassport: /^[EG]\\d{8}$/i,\n\t/**\n\t * 港澳通行证\n\t */\n\tHKMacauPass: /^[HM]\\d{8}$/i,\n\t/**\n\t * 账号(6-20位字母或数字,必须以字母开头,不能全为数字)\n\t */\n\tAccount: /^[a-z][a-z\\d]{5,19}$/i,\n\t/**\n\t * 弱密码(只包含字母和数字,长度为618位)\n\t */\n\tPassword: /^[A-Z0-9]{6,18}$/i,\n\t/**\n\t * 强密码(820位,包含大小写字母、数字及特殊字符)\n\t */\n\tStrongPassword: /^(?=.*[a-z])(?=.*[A-Z])(?=.*\\d)(?=.*[\\W_])[\\s\\S]{8,20}$/,\n\t/**\n\t * 中文字符\n\t */\n\tChinese: /^[\\u4E00-\\u9FA5]+$/,\n\t/**\n\t * 英文字符\n\t */\n\tEnglish: /^[a-z]+$/i,\n};\n"],"mappings":";;AACA,MAAa,UAAU;;;;CAItB,MAAM;;;;CAIN,QAAQ;;;;CAIR,OAAO;;;;CAIP,OAAO;;;;CAIP,QAAQ;;;;;CAKR,UAAU;;;;CAIV,KAAK;;;;CAIL,WAAW;;;;CAIX,oBACC;;;;CAID,UAAU;;;;CAIV,MAAM;;;;CAIN,UAAU;;;;CAIV,aAAa;;;;CAIb,SAAS;;;;CAIT,UAAU;;;;CAIV,gBAAgB;;;;CAIhB,SAAS;;;;CAIT,SAAS;AACV"}
1
+ {"version":3,"file":"regex.mjs","names":[],"sources":["../../src/constants/regex.ts"],"sourcesContent":["/** Fast 业务表单和输入组件共享的正则表达式集合。 */\nexport const RegExps = {\n\t/**\n\t * UUID\n\t */\n\tUUID: /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i,\n\t/**\n\t * 手机号\n\t */\n\tMobile: /^1[3-9]\\d{9}$/,\n\t/**\n\t * 电话\n\t */\n\tPhone: /^(?:(?:\\d{3}-)?\\d{8}|(?:\\d{4}-)?\\d{7,8})(?:-\\d+)?$/,\n\t/**\n\t * 邮箱\n\t */\n\tEmail: /^[A-Za-z0-9._%+-]+@(?:[A-Za-z0-9](?:[A-Za-z0-9-]*[A-Za-z0-9])?\\.)+[A-Za-z]{2,}$/,\n\t/**\n\t * 身份证\n\t */\n\tIdCard: /(^[1-9]\\d{5}(18|19|([23]\\d))\\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\\d{3}[0-9X]$)|(^[1-9]\\d{7}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\\d{2}[0-9X]$)/i,\n\t/**\n\t * 外部链接\n\t * 匹配http、https、mailto、tel和ftp开头的链接\n\t */\n\tExternal: /^(https?:|mailto:|tel:|ftp:)/,\n\t/**\n\t * Url\n\t */\n\tUrl: /^(https?|ftp):\\/\\/([a-zA-Z0-9.-]+(:[a-zA-Z0-9.&%$-]+)*@)*((25[0-5]|2[0-4]\\d|1\\d{2}|[1-9]\\d?)(\\.(25[0-5]|2[0-4]\\d|1\\d{2}|[1-9]?\\d)){3}|([a-zA-Z0-9-]+\\.)*[a-zA-Z0-9-]+\\.(com|edu|gov|int|mil|net|org|biz|arpa|info|name|pro|aero|coop|museum|[a-zA-Z]{2}))(:\\d+)*(\\/($|[\\w.,?'\\\\+&%$#=~-]+))*$/,\n\t/**\n\t * 车牌号\n\t */\n\tCarNumber: /^[京津冀晋蒙辽吉黑沪苏浙皖闽赣鲁豫鄂湘粤桂琼渝川贵云藏陕甘青宁新军使领][A-HJ-Z][A-HJ-NP-Z0-9]{4}[A-HJ-NP-Z0-9挂学警港澳]$/,\n\t/**\n\t * 新能源车牌号\n\t */\n\tNewEnergyCarNumber:\n\t\t/^[京津冀晋蒙辽吉黑沪苏浙皖闽赣鲁豫鄂湘粤桂琼渝川贵云藏陕甘青宁新军使领][A-HJ-Z]((\\d{5}[DF]$)|([A-E][A-HJ-NP-Z0-9]\\d{3}[0-9挂学警港澳]$)|([FGHJK][A-HJ-NP-Z0-9]\\d{3}[0-9挂学警港澳]$))/,\n\t/**\n\t * 邮政编码\n\t */\n\tPostCode: /^[1-9]\\d{5}$/,\n\t/**\n\t * ipv4\n\t */\n\tIpv4: /^([01]?\\d{1,2}|2[0-4]\\d|25[0-5])\\.([01]?\\d{1,2}|2[0-4]\\d|25[0-5])\\.([01]?\\d{1,2}|2[0-4]\\d|25[0-5])\\.([01]?\\d{1,2}|2[0-4]\\d|25[0-5])$/,\n\t/**\n\t * 护照\n\t */\n\tPassport: /^[EG]\\d{8}$/i,\n\t/**\n\t * 港澳通行证\n\t */\n\tHKMacauPass: /^[HM]\\d{8}$/i,\n\t/**\n\t * 账号(6-20位字母或数字,必须以字母开头,不能全为数字)\n\t */\n\tAccount: /^[a-z][a-z\\d]{5,19}$/i,\n\t/**\n\t * 弱密码(6~18位,仅包含字母和数字)\n\t */\n\tPassword: /^[A-Z0-9]{6,18}$/i,\n\t/**\n\t * 中密码(8~20位,必须包含大小写字母、数字)\n\t */\n\tMediumPassword: /^(?=.*[a-z])(?=.*[A-Z])(?=.*\\d)\\S{8,20}$/,\n\t/**\n\t * 强密码(8~20位,必须包含大小写字母、数字及特殊字符)\n\t */\n\tStrongPassword: /^(?=.*[a-z])(?=.*[A-Z])(?=.*\\d)(?=.*[^\\w\\s])\\S{8,20}$/,\n\t/**\n\t * 中文字符\n\t */\n\tChinese: /^[\\u4E00-\\u9FA5]+$/,\n\t/**\n\t * 英文字符\n\t */\n\tEnglish: /^[a-z]+$/i,\n\t/**\n\t * 验证码6位\n\t */\n\tVerificationCode: /^[0-9]{6}$/,\n\t/**\n\t * 图片验证码4位\n\t */\n\tImageCaptchaCode: /^[A-Za-z0-9]{4}$/,\n};\n"],"mappings":";;AACA,MAAa,UAAU;;;;CAItB,MAAM;;;;CAIN,QAAQ;;;;CAIR,OAAO;;;;CAIP,OAAO;;;;CAIP,QAAQ;;;;;CAKR,UAAU;;;;CAIV,KAAK;;;;CAIL,WAAW;;;;CAIX,oBACC;;;;CAID,UAAU;;;;CAIV,MAAM;;;;CAIN,UAAU;;;;CAIV,aAAa;;;;CAIb,SAAS;;;;CAIT,UAAU;;;;CAIV,gBAAgB;;;;CAIhB,gBAAgB;;;;CAIhB,SAAS;;;;CAIT,SAAS;;;;CAIT,kBAAkB;;;;CAIlB,kBAAkB;AACnB"}