Skip to content

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

Fix email validation regex (#5533)

Felipe Hertzer8b1a4365ed9f
diff --git a/api/apps/user_app.py b/api/apps/user_app.py
index a78fad5df4..1cf85986c8 100644
--- a/api/apps/user_app.py
+++ b/api/apps/user_app.py
@@ -566,7 +566,7 @@ def user_add():
email_address = req["email"]
# Validate the email address
- if not re.match(r"^[\w\._-]+@([\w_-]+\.)+[\w-]{2,5}$", email_address):
+ if not re.match(r"^[\w\._-]+@([\w_-]+\.)+[\w-]{2,}$", email_address):
return get_json_result(
data=False,
message=f"Invalid email address: {email_address}!",