Liking cljdoc? Tell your friends :D

forms.re-frame


constructorcljs

(constructor validator)
(constructor validator path)
(constructor validator path data)
(constructor validator path data opts)

Form constructor. It accepts the following arguments:

  • validator - returned either by the form.validator/validator or form.validator/comp-validators function
  • path - path in the db where to put the form
  • data - initial data map
  • opts - map with the form options:
    • :on-commit - function to be called when the form is commited (by calling (commit! form))
    • :auto-validate? - should the form be validated on any data change
Form constructor. It accepts the following arguments:

- `validator` - returned either by the `form.validator/validator` or `form.validator/comp-validators` function
- `path` - path in the db where to put the form
- `data` - initial data map
- `opts` - map with the form options:
    + `:on-commit` - function to be called when the form is commited (by calling `(commit! form)`)
    + `:auto-validate?` - should the form be validated on any data change
raw docstring

errors-for-pathcljs

(errors-for-path db [_ form-path key-path])

errors-keypathscljs

(errors-keypaths data)
(errors-keypaths data path results)

Calculates the error key paths from the error map. It is used to mark all invalid key paths as dirty

Calculates the error key paths from the error map. It is used to mark
all invalid key paths as dirty
raw docstring

form-path->db-pathcljs

(form-path->db-path form-path)

is-valid?cljs

(is-valid? form-state)

mark-dirty!cljs

(mark-dirty! form-state)

mark-dirty-paths!cljs

(mark-dirty-paths! form-state)

set-valuecljs

(set-value db [_ form-path key-path value])

validate!cljs

(validate! db [_ form-path dirty-only?])

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close