Commit ce73a88c88ef2cf1a7394135d3e2829ed8fc858c
1 parent
33707c41
1 身份证不需要必填 !=null && !=undedifined && !=''
Showing
1 changed file
with
1 additions
and
1 deletions
pages/user/userinfo/userinfo.js
... | ... | @@ -812,7 +812,7 @@ Page({ |
812 | 812 | } |
813 | 813 | var identity_card = th.data.identity_card; //身份证 |
814 | 814 | |
815 | - if (identity_card != "" && !(/(^\d{15}$)|(^\d{18}$)|(^\d{17}(\d|X|x)$)/.test(identity_card))) { | |
815 | + if (identity_card!=null && identity_card!=undefined && identity_card != "" && !(/(^\d{15}$)|(^\d{18}$)|(^\d{17}(\d|X|x)$)/.test(identity_card))) { | |
816 | 816 | getApp().my_warnning("身份证号码错误", 0, th); |
817 | 817 | return false; |
818 | 818 | } | ... | ... |