Skip to content

Commit

Permalink
support capital letters in emails
Browse files Browse the repository at this point in the history
  • Loading branch information
ginesdt committed Oct 4, 2023
1 parent 84815ac commit 0adfd28
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/streamtide/shared/utils.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@
(def email-pattern (re-pattern "(?:[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*|\"(?:[\\x01-\\x08\\x0b\\x0c\\x0e-\\x1f\\x21\\x23-\\x5b\\x5d-\\x7f]|\\\\[\\x01-\\x09\\x0b\\x0c\\x0e-\\x7f])*\")@(?:(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?|\\[(?:(?:(2(5[0-5]|[0-4][0-9])|1[0-9][0-9]|[1-9]?[0-9]))\\.){3}(?:(2(5[0-5]|[0-4][0-9])|1[0-9][0-9]|[1-9]?[0-9])|[a-z0-9-]*[a-z0-9]:(?:[\\x01-\\x08\\x0b\\x0c\\x0e-\\x1f\\x21-\\x5a\\x53-\\x7f]|\\\\[\\x01-\\x09\\x0b\\x0c\\x0e-\\x7f])+)\\])"))

(defn valid-email? [email]
(re-matches email-pattern email))
(re-matches email-pattern (string/lower-case email)))

(def social-domains
{:facebook ["facebook.com" "fb.com" "fb.me"]
Expand Down

0 comments on commit 0adfd28

Please sign in to comment.