Settings loader update with basic email check, and on check abort if not valid

In the settings checker, if a regex_clean is set as None then we will abort the script with error
if the regex is not matching

Add regex check for email basic

Also add a regex_constants list with regex entries (not compiled and compiled)
This commit is contained in:
Clemens Schwaighofer
2025-07-14 15:57:19 +09:00
parent 7183d05dd6
commit 6c2637ad34
8 changed files with 79 additions and 16 deletions

View File

@@ -0,0 +1,10 @@
"""
List of regex compiled strings that can be used
"""
EMAIL_REGEX_BASIC = r"""
^[A-Za-z0-9!#$%&'*+\-\/=?^_`{|}~][A-Za-z0-9!#$%:\(\)&'*+\-\/=?^_`{|}~\.]{0,63}
@(?!-)[A-Za-z0-9-]{1,63}(?<!-)(?:\.[A-Za-z0-9-]{1,63}(?<!-))*\.[a-zA-Z]{2,6}$
"""
# __END__