身份证号校验错误bug
This commit is contained in:
parent
0f3ca55ac3
commit
f7e06d67a1
|
@ -106,7 +106,7 @@ def p_in_poly(p, poly):
|
||||||
|
|
||||||
|
|
||||||
def check_id_number_e(val):
|
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):
|
if not re.match(re_s, val):
|
||||||
raise ValidationError('身份证号校验错误')
|
raise ValidationError('身份证号校验错误')
|
||||||
return val
|
return val
|
||||||
|
|
Loading…
Reference in New Issue