making main form better.
This commit is contained in:
@@ -10,7 +10,6 @@
|
||||
(s/def ::due (s/nilable ::shared/date))
|
||||
(s/def ::scheduled-payment (s/nilable ::shared/date))
|
||||
(s/def ::total ::shared/money)
|
||||
(s/def ::vendor-id ::shared/identifier)
|
||||
|
||||
(s/def ::invoice (s/keys :req-un [::client
|
||||
::invoice-number
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
[clojure.string :as str]))
|
||||
|
||||
(def date-regex #"[0-9]{4}-[0-9]{1,2}-[0-9]{1,2}")
|
||||
(def money-regex #"\-?[0-9]+(\.[0-9]{1,2})?$")
|
||||
(def money-regex #"\-?[0-9]+(\.[0-9]{2})?$")
|
||||
(def numeric-regex #"^[0-9]+$")
|
||||
(def only-upper-case #"^[A-Z]+$")
|
||||
|
||||
@@ -14,4 +14,5 @@
|
||||
|
||||
(s/def ::money (s/or :string (s/and string?
|
||||
#(re-matches money-regex %))
|
||||
:float float?))
|
||||
:float float?
|
||||
:int int?))
|
||||
|
||||
Reference in New Issue
Block a user