(all-fields-valid? fields)
Returns true if all fields
are valid.
Returns true if all `fields` are valid.
(build-form {:keys [on-submit experience class]} children)
(get-custom-elements fields form-state)
Returns a collection of customized elements according to fields
.
Returns a collection of customized elements according to `fields`.
(get-default-meta fields)
Returns a default meta object according to fields
name.
{:field-name {:touched false :valid false :errors []}}
Returns a default meta object according to `fields` name. {:field-name {:touched false :valid false :errors []}}
(get-error-messages validators value)
Returns array of errors from validators executed in value
.
Returns array of errors from validators executed in `value`.
(get-field-meta form-state name validators required?)
Returns a meta object with dynamic values according to the
validations executed in form-state
.
Returns a meta object with dynamic values according to the validations executed in `form-state`.
(get-input-class name form-state)
Returns an array of class name according to the :meta from form-state
.
:valid/:invalid and :touched/:untouched
Returns an array of class name according to the :meta from `form-state`. :valid/:invalid and :touched/:untouched
(input attrs form-state field)
(on-blur _ form-state {:keys [name validators required]})
Update :meta from form-state
according to the validations.
Update :meta from `form-state` according to the validations.
(on-change e form-state {:keys [name validators required]})
Update :state from form-state
to input value and
running validations when form is touched.
Update :state from `form-state` to input value and running validations when form is touched.
(some-field-touched? fields)
Returns true if some of the fields
have been touched.
Returns true if some of the `fields` have been touched.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close