-
Notifications
You must be signed in to change notification settings - Fork 0
Internet Address : email , url , ip
Majid Ahmaditabar edited this page Dec 10, 2021
·
2 revisions
- The field under validation must be formatted as an email address.
- The field under validation must be a valid URL.
- The field under validation must be an IP address.
- The field under validation must be an IPv4 address.
- The field under validation must be an IPv6 address.
data = {
"email": "[email protected]",
"url": "http://google.com",
"ip": "192.168.1.1",
"ipv4": "192.168.1.1",
"ipv6": "2001:0db8:85a3:0000:0000:8a2e:0370:7334"
}
rules = {
"email": ["required", "email"],
"url": ["required", "url"],
"ip": ["required", "ip"],
"ipv4": ["required", "ipv4"],
"ipv6": ["required", "ipv6"],
}
validate = PyValidations.make(data, rules)