Merge pull request #1655 from penpot/multiple-members-invitations

 Allow send multiple team invitations at once
This commit is contained in:
Andrey Antukh 2022-03-04 15:20:51 +01:00 committed by GitHub
commit 192b9213ac
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
15 changed files with 326 additions and 62 deletions

View file

@ -161,14 +161,14 @@
(def email-re #"[a-zA-Z0-9_.+-]+@[a-zA-Z0-9-]+\.[a-zA-Z0-9-.]+")
(defn parse-email
[s]
(some->> s (re-seq email-re) first))
(s/def ::email
(s/conformer
(fn [v]
(if (string? v)
(if-let [matches (re-seq email-re v)]
(first matches)
(do ::s/invalid))
::s/invalid))
(or (parse-email v) ::s/invalid))
str))
(s/def ::set-of-emails