added postcode validation
This commit is contained in:
@@ -34,6 +34,11 @@ class Validator:
|
||||
regex = re.compile(r'^(?=.*[A-Za-z])(?=.*\d)(?=.*[@$!%*#?&])[A-Za-z\d@$!%*#?&]{8,31}$')
|
||||
return re.fullmatch(regex, input)
|
||||
|
||||
@staticmethod
|
||||
def check_postcode(input):
|
||||
regex = re.compile(r'\b\d{4}[A-Z]{2}\b')
|
||||
return re.fullmatch(regex, input)
|
||||
|
||||
class InputMenu:
|
||||
|
||||
def __init__(self, title):
|
||||
|
Reference in New Issue
Block a user