This namespace contains replacements for the basic form elements (input, select, textbox) but with corresponding states.
The select
item also supports any kind of values for the
:value
attribute of option
s, not just strings.
Additionally, the new attributes :invalid
and :validate
are
supported for all of them, allowing for a declarative way to
use setCustomValidity
on the dom nodes.
An attribute :report-validity
can be set to true on input items
and form
to call reportValidity
on them on every state
change.
This namespace contains replacements for the basic form elements (input, select, textbox) but with corresponding states. The [[select]] item also supports any kind of values for the `:value` attribute of [[option]]s, not just strings. Additionally, the new attributes `:invalid` and `:validate` are supported for all of them, allowing for a declarative way to use `setCustomValidity` on the dom nodes. An attribute `:report-validity` can be set to true on input items and [[form]] to call `reportValidity` on them on every state change.
Utility to create specialized input fields via parsing of the native value.
Utility to create specialized input fields via parsing of the native value.
No vars found in this namespace.
Input types extend over the :type
attribute
of reacl-c-basics.forms.core/input
items, giving more control
over the data types of the state value, and to some extend over the
ui controls to enter those values. The type system defined here is
also extensible.
For example, you can ask the user for an integer via
(c/isolate-state 0
(core/input {:type types/integer}))
Input types extend over the `:type` attribute of [[reacl-c-basics.forms.core/input]] items, giving more control over the data types of the state value, and to some extend over the ui controls to enter those values. The type system defined here is also extensible. For example, you can ask the user for an integer via ``` (c/isolate-state 0 (core/input {:type types/integer})) ```
EXPERIMENTAL
Utilities for a more customized display of form validity.
Note: the basic validity of input fields can be defined with the
:invalid
and :validate
attribtues
of reacl-c-basics.forms.core/input
etc.
Note: the validation message for native validations (:pattern
,
:required
etc) can be modified by using setCustomValidity
in
:onInvalid
events depending on the validity
property.
For visual styling there are the :required
and :options
CSS
pseudo-classes, as well as :valid
and :invalid
.
For showing validation problems differently than the browser does by
default, use with-validity
and the derived
utils form-with-validity
or append-validity
.
To trigger the display of validation problems before submitting a
form, use report-validity!
.
See https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/Constraint_validation
EXPERIMENTAL Utilities for a more customized display of form validity. Note: the basic validity of input fields can be defined with the `:invalid` and `:validate` attribtues of [[reacl-c-basics.forms.core/input]] etc. Note: the validation message for native validations (`:pattern`, `:required` etc) can be modified by using `setCustomValidity` in `:onInvalid` events depending on the `validity` property. For visual styling there are the `:required` and `:options` CSS pseudo-classes, as well as `:valid` and `:invalid`. For showing validation problems differently than the browser does by default, use [[with-validity]] and the derived utils [[form-with-validity]] or [[append-validity]]. To trigger the display of validation problems before submitting a form, use [[report-validity!]]. See https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/Constraint_validation
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close