(get fields :red-tape/form)]))
+ "Sanity check defform guts so people don't go fucking insane when it breaks."
+ [arguments initial fields field-keys]
+ (format "Form arguments must be symbols; got %s" arg)))
+ (format "Initial form data must be specified as a map; got %s" initial))
+ (format "Initial form data keys must be keywords; got %s" k))
+ (contains? (set field-keys) k)
+ (format "Initial form data contains a field not in the form: %s" k)))
+ (doseq [[field-key cleaners] fields]
+ "Field cleaners must be given in a vector; got %s for field %s"
+ (format "Field names must be keywords; got %s" k))))
"For internal use only. You probably want form or defform. Turn back now.
+ (sanity-check-form-guts arguments initial fields field-keys)