fixing issue with address making it never saveable.

This commit is contained in:
Bryce Covert
2018-07-27 08:41:07 -07:00
parent 3013a46c57
commit 05dbb7c11b

View File

@@ -5,8 +5,10 @@
(s/def ::street1 (s/nilable string?))
(s/def ::street2 (s/nilable string?))
(s/def ::city (s/nilable string?))
(s/def ::state (s/nilable (s/and string?
#(re-matches #"[a-zA-Z]{2}" %))))
(s/def ::state (s/nilable (s/or
:empty (s/and string? #{""})
:filled (s/and string?
#(re-matches #"[a-zA-Z]{2}" %)))))
(s/def ::zip (s/nilable string?))
(s/def ::address (s/keys :opt-un [::email