-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathEmployeeVerification.py
More file actions
28 lines (23 loc) · 849 Bytes
/
EmployeeVerification.py
File metadata and controls
28 lines (23 loc) · 849 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
import re
class Verification:
def verifyemail(self):
pattern = re.compile(r"\w+[^_][.]{0,1}\w+@[^0-9]\w+\.{0,1}\w+\.{0,1}\w+")
while 1:
email = input("enter email: ")
if pattern.match(email):
return email
print("<< Invalid email >>")
def verifyid(self):
pattern = re.compile(r"[a-zA-Z]*[1-9]*")
while 1:
enr = input("enter Id: ")
if pattern.match(enr):
return enr
print("<< Invalid ID >>")
def verifynumber(self):
pattern = re.compile(r"[0-9]")
while 1:
no = input("enter Number: ")
if (len(pattern.findall(no))==10):
return no
print("<< Invalid Number >>")