setFormConfig
Sets the global form configuration object that all forms inherit.
setFormConfig({
/// set configuration inherited by all form instances
})
/// or set on individual form _instance_
const form = createForm({
initial: {},
config: {
/// ...config
},
})type FormConfig = {
autoValidate?: boolean,
validateConcurrentlyOnSubmit?: boolean,
preserveValidationErrorOnUpdate?: boolean,
}Options
autoValidate
When set to true, all form instances will automatically run validations whenever the field
value changes.
ℹ️
Can be overriden by setting a config to a specific form instance.
validateConcurrentlyOnSubmit
When set to true, calling the submit method will trigger concurrent validation of all form fields.
Default is false, and calling the submit method triggers sequential validation of your form fields, stopping
if any validation fails.
preserveValidationErrorOnUpdate
When set to true, field validation errors will be preserved after updates.
Default is false, and updating the field value will clear its validation error.