(form-valid? id)
Returns true if all the inputs on the form pass the validations. The output could be used to show an error on the form, or hide or disable the submit button
Returns true if all the inputs on the form pass the validations. The output could be used to show an error on the form, or hide or disable the submit button
(form-value id)
Returns the value of all the inputs in the form as a map, where the keys are the keys used on the on-change function or the :lib.form.events/set-input-val event
Returns the value of all the inputs in the form as a map, where the keys are the keys used on the on-change function or the :lib.form.events/set-input-val event
(init! state-spec)
Initializes the reframe events with the given state spec on the interceptors
Initializes the reframe events with the given state spec on the interceptors
(input-error id k)
Returns the error of the input if it didn't pass the validation as a string, nil if no errors. The output could be used to display the error in the input
Returns the error of the input if it didn't pass the validation as a string, nil if no errors. The output could be used to display the error in the input
(input-not-pristine-error id k)
Same as input-error but only returns the error if the field is not pristine
Same as input-error but only returns the error if the field is not pristine
(input-valid? id k)
Returns a boolean indicating if the input passes the validation The output could be used to hide or show the error on the input, and to assign the error class to the field.
Returns a boolean indicating if the input passes the validation The output could be used to hide or show the error on the input, and to assign the error class to the field.
(input-value id k)
Returns the value of an input. The output should be used as the value attribute of the controlled input
Returns the value of an input. The output should be used as the value attribute of the controlled input
(on-change id path)
(on-change id path form-value-atom)
Syntactic sugar function for the form inputs. The output should be used as the value for the on-change event listener of the inputs.
Syntactic sugar function for the form inputs. The output should be used as the value for the on-change event listener of the inputs.
(on-submit id f)
Syntactic sugar function for submitting the forms. Calls the given function f with the form value, if the form is valid
Syntactic sugar function for submitting the forms. Calls the given function f with the form value, if the form is valid
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close