    Normally used for a call to the {:pre...} at the beginning of a function."
   [arg-defs passed-args]
   (let [passed-arg-keys (set (keys passed-args))]
-    (and (args-names-valid?     (:names        arg-defs) passed-arg-keys)
-         (required-args-passed? (:required     arg-defs) passed-arg-keys)
-         (validate-fns-pass?    (:validate-fns arg-defs) passed-args))))
+    (and (arg-names-valid?      (:arg-names      arg-defs) passed-arg-keys)
+         (required-args-passed? (:required-args  arg-defs) passed-arg-keys)
+         (validate-fns-pass?    (:validated-args arg-defs) passed-args))))
 
 
 ;; ----------------------------------------------------------------------------

                           (false?  validate-result) (log-error "Argument '" arg-name "' validation failed. Expected '" (:type v-arg-def) "'. Got '" (left-string arg-val 40) "'")
                           (string? validate-result) (log-error validate-result)
                           :else                     (log-error "Invalid return from validate-fn: " validate-result))))]
    (->> (select-keys v-arg-defs (keys passed-args))
         (map validate-arg)
         (every? true?))))




(defn validate-fns-pass?
  "returns true if all argument values are valid  (for args which have a validator).
   Otherwise log error and return false.
   Validation functions can return:
         - true:   validation success
         - false:  validation failed - use standard error message
         - string: validation failed - use this string in place of standard error message"
  [args-with-validators passed-args]
  (let [validate-arg (fn [[_ v-arg-def]]
                       (let [arg-name        (:name v-arg-def)
                             arg-val         (arg-name passed-args)
                             validate-result ((:validate-fn v-arg-def) arg-val)]
