Skip to content

RAGFlow is an agent-native database: a Retrieval-Augmented Generation (RAG) engine that grew into context infrastructure.

Enhance email validation: Allow top-level domains with 5 letters (#2856)

Dustin Kaiser6850fd69c654
diff --git a/api/apps/user_app.py b/api/apps/user_app.py
index 1535446d36..0c113dcde1 100644
--- a/api/apps/user_app.py
+++ b/api/apps/user_app.py
@@ -354,7 +354,7 @@ def user_add():
email_address = req["email"]
# Validate the email address
- if not re.match(r"^[\w\._-]+@([\w_-]+\.)+[\w-]{2,4}$", email_address):
+ if not re.match(r"^[\w\._-]+@([\w_-]+\.)+[\w-]{2,5}$", email_address):
return get_json_result(data=False,
retmsg=f'Invalid email address: {email_address}!',
retcode=RetCode.OPERATING_ERROR)