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
sourceraw docstring

errors-for-pathcljs

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

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
sourceraw docstring

form-path->db-pathcljs

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

is-valid?cljs

(is-valid? form-state)
source

mark-dirty!cljs

(mark-dirty! form-state)
source

mark-dirty-paths!cljs

(mark-dirty-paths! form-state)
source

set-valuecljs

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

validate!cljs

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

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

× close