fix: email check validation to handle case in-sensitive email (#6168)

This commit is contained in:
guru_sainath
2024-12-07 17:55:50 +05:30
committed by GitHub
parent 666ddf73b6
commit 9ee41ece98
2 changed files with 4 additions and 0 deletions

View File

@@ -60,6 +60,9 @@ class EmailCheckEndpoint(APIView):
)
return Response(exc.get_error_dict(), status=status.HTTP_400_BAD_REQUEST)
# Lower the email
email = str(email).lower().strip()
# Validate email
try:
validate_email(email)

View File

@@ -60,6 +60,7 @@ class EmailCheckSpaceEndpoint(APIView):
)
return Response(exc.get_error_dict(), status=status.HTTP_400_BAD_REQUEST)
email = str(email).lower().strip()
# Validate email
try:
validate_email(email)