generated from talltechy/a-good-readme-template
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvalidators.py
More file actions
29 lines (22 loc) · 867 Bytes
/
validators.py
File metadata and controls
29 lines (22 loc) · 867 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
29
# main.py
from utils import log_message, secure_random_string
from validators import validate_email, validate_password
def main():
log_message("Starting application...")
# Example usage of utility functions
random_string = secure_random_string(16)
log_message(f"Generated secure random string: {random_string}")
# Example usage of validation functions
email = "example@example.com"
password = "ExamplePassword123!"
if validate_email(email):
log_message(f"Email '{email}' is valid.")
else:
log_message(f"Email '{email}' is invalid.")
password_validation_result = validate_password(password)
if password_validation_result is True:
log_message(f"Password is valid.")
else:
log_message(f"Password validation error: {password_validation_result}")
if __name__ == "__main__":
main()