身份证号校验错误bug

This commit is contained in:
曹前明 2022-10-20 17:29:37 +08:00
parent 0f3ca55ac3
commit f7e06d67a1
1 changed files with 1 additions and 1 deletions

View File

@ -106,7 +106,7 @@ def p_in_poly(p, poly):
def check_id_number_e(val):
re_s = r'/^[1-9]\d{5}(18|19|20)\d{2}((0[1-9])|(1[0-2]))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$/;'
re_s = r'^[1-9]\d{5}(18|19|20|(3\d))\d{2}((0[1-9])|(1[0-2]))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$;'
if not re.match(re_s, val):
raise ValidationError('身份证号校验错误')
return val