Showing
1 changed file
with
7 additions
and
4 deletions
| 1 | <!-- | 1 | <!-- |
| 2 | * @Date: 2022-09-14 14:44:30 | 2 | * @Date: 2022-09-14 14:44:30 |
| 3 | * @LastEditors: hookehuyr hookehuyr@gmail.com | 3 | * @LastEditors: hookehuyr hookehuyr@gmail.com |
| 4 | - * @LastEditTime: 2024-08-23 13:39:19 | 4 | + * @LastEditTime: 2024-08-23 13:51:02 |
| 5 | * @FilePath: /data-table/src/components/IdentityField/index.vue | 5 | * @FilePath: /data-table/src/components/IdentityField/index.vue |
| 6 | * @Description: 身份证输入控件 | 6 | * @Description: 身份证输入控件 |
| 7 | --> | 7 | --> |
| ... | @@ -183,10 +183,13 @@ var checkCode = function (val) { | ... | @@ -183,10 +183,13 @@ var checkCode = function (val) { |
| 183 | 183 | ||
| 184 | const idCard = { | 184 | const idCard = { |
| 185 | verify: function (val) { | 185 | verify: function (val) { |
| 186 | - if(checkCode(val)) { | 186 | + if (val.indexOf('*') !== -1) { // 默认值是加密模式,跳过校验 |
| 187 | + return true; | ||
| 188 | + } | ||
| 189 | + if (checkCode(val)) { | ||
| 187 | var date = val.substring(6,14); | 190 | var date = val.substring(6,14); |
| 188 | - if(checkDate(date)) { | 191 | + if (checkDate(date)) { |
| 189 | - if(checkProv(val.substring(0,2))) { | 192 | + if (checkProv(val.substring(0,2))) { |
| 190 | return true; | 193 | return true; |
| 191 | } | 194 | } |
| 192 | } | 195 | } | ... | ... |
-
Please register or login to post a comment