started working on validation on action form.
This commit is contained in:
16
src/cljc/auto_ap/entities/invoice.cljc
Normal file
16
src/cljc/auto_ap/entities/invoice.cljc
Normal file
@@ -0,0 +1,16 @@
|
||||
(ns auto-ap.entities.invoice
|
||||
(:require [clojure.spec.alpha :as s]
|
||||
[auto-ap.entities.shared :as shared]))
|
||||
|
||||
(s/def ::vendor-id int?)
|
||||
(s/def ::company-id int?)
|
||||
(s/def ::invoice-number ::shared/required-identifier)
|
||||
(s/def ::date ::shared/date)
|
||||
(s/def ::total ::shared/money)
|
||||
|
||||
(s/def ::invoice (s/keys :opt-un [::vendor-id
|
||||
::company-id
|
||||
::invoice-number
|
||||
::date
|
||||
::total
|
||||
]))
|
||||
Reference in New Issue
Block a user