mirror of
https://github.com/penpot/penpot.git
synced 2025-07-29 13:07:21 +02:00
Merge pull request #1655 from penpot/multiple-members-invitations
✨ Allow send multiple team invitations at once
This commit is contained in:
commit
192b9213ac
15 changed files with 326 additions and 62 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue