Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def validate_format(number):
- length = len(number)
- if length == 14:
- if (re.match(formats[0], number)):
- return True
- return False
- if length == 12:
- if (re.match(formats[1], number)):
- return True
- return False
- if length == 11:
- if (re.match(formats[2], number)):
- return True
- return False
- if length == 10:
- if (re.match(formats[3], number)):
- return True
- return False
- return False
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement