身份证号校验错误bug
This commit is contained in:
parent
f7e06d67a1
commit
885497f651
|
@ -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|(3\d))\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
|
||||
|
|
Loading…
Reference in New Issue