@rjsf/validator-ajv8
Advanced tools
Changelog
5.2.0
ErrorList
, IconButton
s, WrapIfAdditionalTemplate
and AltDateWidget
to use the new translateString()
function to support localizationAddButton
, ErrorList
, IconButton
s and WrapIfAdditionalTemplate
to use the new translateString()
function to support localizationAddButton
, ErrorList
, IconButton
s, WrapIfAdditionalTemplate
and AltDateWidget
to use the new translateString()
function to support localizationArrayField
, BooleanField
, MultiSchemaField
, ObjectField
, SchemaField
, AddButton
, IconButton
s, ErrorList
, WrapIfAdditionalTemplate
and AltDateWidget
and FileWidget
to use the new translateString()
function to support localization
Form
to take a new optional translateString
prop and getDefaultRegistry()
to set translateString
to englishStringTranslator()
AddButton
, ColorWidget
, ErrorList
, IconButton
s and UpDownWidget
to use the new translateString()
function to support localizationAddButton
, ErrorList
, IconButton
s and WrapIfAdditionalTemplate
to use the new translateString()
function to support localizationRangeWidget
to support 0
as range slider value, fixing #3458AddButton
, ErrorList
, IconButton
s and WrapIfAdditionalTemplate
to use the new translateString()
function to support localizationRangeWidget
to support 0
as range slider value, fixing #3458AddButton
, ErrorList
, IconButton
s and WrapIfAdditionalTemplate
to use the new translateString()
function to support localizationutility-functions
documentation for the enums
and englishStringTranslator()
& replaceStringParameters()
functionsform-props
documentation for the new, optional translateString
prop on Form
numbers
example to use a range slider with a valid negative and 0
valueChangelog
5.1.0
AltDateTimeWidget
in @rjsf/core
to add className="list-inline-item"
to the LI
tagsSelectWidget
to allow the proper display of the selected value, fixing #3422Form
to remove passing excludeObjectChildren
to getDefaultFormState()
, fixing #3424 and #675focusOnFirstError
, that if true, will cause the first field with an error to be focused on when a submit has errorscomputeDefaults()
to fix additionalProperties defaults not being propagated, fixing #2593
anyOf
/oneOf
lists by simply returning undefinedfocusOnFirstError
and the form-props
documentation for it as wellChangelog
5.0.2
idPrefix
, idSeparator
and rawErrors
optional props to FieldProps
since they were missingcustom-widgets-field
documentation for the new FieldProps
Changelog
5.0.1
peerDependencies
in all packages to remove the -beta.x
tags from the @rjsf/xxxx
packagesChangelog
5.0.0
CheckboxesWidget
, RadioWidget
and SelectWidget
to use indexes as values to support enumOptions
with object values, fixing #1494CheckboxesWidget
, RadioWidget
and SelectWidget
to use indexes as values to support enumOptions
with object values, fixing #1494CheckboxesWidget
, RadioWidget
and SelectWidget
to use indexes as values to support enumOptions
with object values, fixing #1494CheckboxesWidget
, RadioWidget
and SelectWidget
to use indexes as values to support enumOptions
with object values, fixing #1494CheckboxesWidget
, RadioWidget
and SelectWidget
to use indexes as values to support enumOptions
with object values, fixing #1494CheckboxesWidget
, RadioWidget
and SelectWidget
to use indexes as values to support enumOptions
with object values, fixing #1494CheckboxesWidget
, RadioWidget
and SelectWidget
to use indexes as values to support enumOptions
with object values, fixing #1494CheckboxesWidget
, RadioWidget
and SelectWidget
to use indexes as values to support enumOptions
with object values, fixing #1494enumOptionsIndexForValue()
, enumOptionsIsSelected()
, enumOptionsValueForIndex()
functions to support fixing #1494
enumOptionsDeselectValue()
, enumOptionsSelectValue()
and optionId()
to use indexes instead of valuesprocessSelectValue()
that was added in the beta and is no longer neededgetSchemaType()
to remove the inference of type from anyOf
/oneOf
, fixing #3412utility-functions
documentation for the new and updated methods mentioned above, as well as deleting the documentation for processSelectValue()
Enum Objects
example to highlight the use of indexes for enumOptions
5.x migration guide
to document the change from values to indexes for the enumOptions
based controls.Changelog
5.0.0-beta.20
schema.examples
to deduplicate when schema.default
exists in the examples, fixing #3393schema.examples
to deduplicate when schema.default
exists in the examples, fixing #3393schema.examples
to deduplicate when schema.default
exists in the examples, fixing #3393MultiSchemaField
to pass undefined
as the value to the widget when the selectedOption
is -1, supporting SelectWidget
implementations that allow the user to clear the selected value of the anyOf
/oneOf
field.Form
to support receiving an optional ref
prop.Form
to restore providing empty root level objects, fixing #3391schema.examples
to deduplicate when schema.default
exists in the examples, fixing #3393schema.examples
to deduplicate when schema.default
exists in the examples, fixing #3393schema.examples
to deduplicate when schema.default
exists in the examples, fixing #3393schema.examples
to deduplicate when schema.default
exists in the examples, fixing #3393schema.examples
to deduplicate when schema.default
exists in the examples, fixing #3393Changelog
5.0.0-beta.19
MultiSchemaField
to cache options with refs in state and to output better labels for options without them when a title is available in either the schema
or uiSchema
ui:fieldReplacesAnyOrOneOf
flag to the uiSchema
that when true will allow users to opt-out of the anyOf
/oneOf
wrapping of a custom fieldtoPathSchema()
to handle oneOf
/anyOf
by picking the closest option and generating the path for it, fixing #2262uiSchema
only flag ui:fieldReplacesAnyOrOneOf
that, if true allows the user to opt-out of the anyOf
/oneOf
wrapping of a custom fielduiSchema
documentation for ui:fieldReplacesAnyOrOneOf
Changelog
5.0.0-beta.18
MultiSchemaField
to utilize the new getClosestMatchingOption()
and sanitizeDataForNewSchema()
functions, fixing the following issues:
ObjectField
to deal with additionalProperties
with oneOf
/anyOf
, fixing #2538Form
, MultiSchemaField
, ObjectField
and SchemaField
to properly support making formData
optional, fixing #3305SelectWidget
label only if value is not empty, fixing #3369SelectWidget
label only if value is not empty, fixing #3369getClosestMatchingOption()
, getFirstMatchingOption()
and sanitizeDataForNewSchema()
schema-based utility functions
getMatchingOption()
and updated all calls to it in other utility functions to use getFirstMatchingOption()
stubExistingAdditionalProperties()
to deal with additionalProperties
with oneOf
/anyOf
, fixing #2538getSchemaType()
to grab the type of the first element of a oneOf
/anyOf
, fixing #1654T
to allow for them to be optionally provided, fixing #3305
formData
was required as a function argument to make it optional, fixing #3305formData
was required as a function argument to make it optional, fixing #3305onFormDataEdited()
to only change the formData in the state if the JSON.stringify()
of the old and new values are different, partially fixing #3236npm start
command to always use the --force
option to avoid issues where changes made to other packages weren't getting picked up due to vite
cachingutility-functions
and the 5.x upgrade guide
to add the new utility functions and to document the deprecation of getMatchingOption()
utility-functions
, making all optional parameters without a default (as denoted by the syntax [<parameter>]: <type>
) to add | undefined
onto the type to make it clear it supports passing in undefined as a value.Changelog
5.0.0-beta.17
SelectWidget
by the label that the user sees rather than by the valuestyle
prop on FieldTemplate
and WrapIfAdditionalTemplate
rendering them on the outermost wrapper, partially fixing #1200aria-describedby
value built using the ariaDescribedByIds()
function, partially fixing #959
style
prop on FieldTemplate
and WrapIfAdditionalTemplate
rendering them on the outermost wrapper, partially fixing #1200CheckboxesWidget
to treat the value as an array when selecting/deselecting values and when determining the checked state - fixing #2141aria-describedby
value built using the ariaDescribedByIds()
function, partially fixing #959
style
prop on FieldTemplate
and WrapIfAdditionalTemplate
rendering them on the outermost wrapper, partially fixing #1200CheckboxesWidget
to treat the value as an array when selecting/deselecting values and when determining the checked state - fixing #2141aria-describedby
value built using the ariaDescribedByIds()
function, partially fixing #959
SchemaField
to handle the new style
prop in the uiSchema
similarly to classNames
, passing it to the FieldTemplate
and removing it from being passed down to children.
style
prop on FieldTemplate
and WrapIfAdditionalTemplate
rendering them on the outermost wrapperCheckboxesWidget
to treat the value as an array when selecting/deselecting values and when determining the checked state - fixing #2141aria-describedby
value built using the ariaDescribedByIds()
function, partially fixing #959
style
prop on FieldTemplate
rendering them on the outermost wrapper, partially fixing #1200CheckboxesWidget
to treat the value as an array when selecting/deselecting values and when determining the checked state - fixing #2141aria-describedby
value built using the ariaDescribedByIds()
function, partially fixing #959
SelectWidget
to support additional TextFieldProps
in a manner similar to how BaseInputTemplate
doesstyle
prop on FieldTemplate
and WrapIfAdditionalTemplate
rendering them on the outermost wrapper, partially fixing #1200CheckboxesWidget
to treat the value as an array when selecting/deselecting values and when determining the checked state - fixing #2141aria-describedby
value built using the ariaDescribedByIds()
function, partially fixing #959
SelectWidget
to support additional TextFieldProps
in a manner similar to how BaseInputTemplate
doesstyle
prop on FieldTemplate
and WrapIfAdditionalTemplate
rendering them on the outermost wrapper, partially fixing #1200CheckboxesWidget
to treat the value as an array when selecting/deselecting values and when determining the checked state - fixing #2141aria-describedby
value built using the ariaDescribedByIds()
function, partially fixing #959
style
prop on FieldTemplate
and WrapIfAdditionalTemplate
rendering them on the outermost wrapper, partially fixing #1200CheckboxesWidget
to treat the value as an array when selecting/deselecting values and when determining the checked state - fixing #2141aria-describedby
value built using the ariaDescribedByIds()
function, partially fixing #959
FieldTemplateProps
, WrapIfAdditionalTemplateProps
and UIOptionsBaseType
types to add style?: StyleHTMLAttributes<any>
, partially fixing #1200enumOptionsDeselectValue()
and enumOptionsSelectValue()
as a loose refactor of the duplicated functions in the various CheckboxesWidget
implementationsFieldTemplateProps
, WrapIfAdditionalTemplateProps
and UIOptionsBaseType
types to add style?: StyleHTMLAttributes<any>
, partially fixing #1200ariaDescribedByIds()
, descriptionId()
, errorId()
, examplesId()
, helpId()
optionId()
and titleId()
id generator functionsAJV8Validator#transformRJSFValidationErrors
to return more human-readable error messages. The ajv8 ErrorObject
message is enhanced by replacing the error message field with either the uiSchema
's ui:title
field if one exists or the parentSchema
title if one exists. Fixes #3246preserveSymlinks
to true
, which provides an alternative fix for #3228 since the prior fix caused #3215.custom-templates.md
and uiSchema.md
to document the new style
propvalidation.md
documentation to describe the new uiSchema
parameter passed to the customValidate()
and transformError()
functionsutility-functions
documentation to add the new enumOptionsDeselectValue()
and enumOptionsSelectValue()
functions and to describe the new id generator functions5.x migration guide
documentation to describe potential breaking id
changesChangelog
5.0.0-beta.16
ButtonTemplates
to pass the new required registry
prop, filtering it out in the actual implementations before spreading props, fixing - #3314CheckboxWidget
validating that the schema.title
is passed as the label, fixing #3302generateXXX
functions for Form
, Theme
, Templates
and Widgets
to support using the theme with user-specified type generics, partially fixing #3072withConfigConsumer
with the ConfigConsumer
component instead, fixing #3336ButtonTemplates
to pass the new required registry
prop, filtering it out in the actual implementations before spreading props, fixing - #3314CheckboxWidget
to get the required
state of the checkbox from the schemaRequiresTrueValue()
utility function rather than the required
prop, fixing #3317CheckboxWidget
validating that the schema.title
is passed as the label, fixing #3302generateXXX
functions for Form
, Theme
, Templates
and Widgets
to support using the theme with user-specified type generics, partially fixing #3072ButtonTemplates
to pass the new required registry
prop, filtering it out in the actual implementations before spreading props, fixing - #3314CheckboxWidget
to get the required
state of the checkbox from the schemaRequiresTrueValue()
utility function rather than the required
prop, fixing #3317CheckboxWidget
validating that the schema.title
is passed as the label, fixing #3302generateXXX
functions for Form
, Theme
, Templates
and Widgets
to support using the theme with user-specified type generics, partially fixing #3072ButtonTemplates
to pass the new required registry
prop, filtering it out in the actual implementations before spreading props, fixing - #3314
registry
into the SubmitButton
inside of the Form
as part of this fixArrayField
to pass the new totalItems
and canAdd
props to the ArrayFieldItemTemplate
instances, fixing #3315
onAddClick
and onAddIndexClick
into a new _handleAddClick()
function, fixing #3316ValidatorType
, CustomValidator
and ErrorTransformer
to add the new generics, as well as passing uiSchema
to the validateFormData()
call, partially fixing #3170ButtonTemplates
to pass the new required registry
prop, filtering it out in the actual implementations before spreading props, fixing - #3314CheckboxWidget
validating that the schema.title
is passed as the label, fixing #3302generateXXX
functions for Form
, Theme
, Templates
and Widgets
to support using the theme with user-specified type generics, partially fixing #3072ButtonTemplates
to pass the new required registry
prop, filtering it out in the actual implementations before spreading props, fixing - #3314CheckboxWidget
validating that the schema.title
is passed as the label, fixing #3302generateXXX
functions for Form
, Theme
, Templates
and Widgets
to support using the theme with user-specified type generics, partially fixing #3072ButtonTemplates
to pass the new required registry
prop, filtering it out in the actual implementations before spreading props, fixing - #3314CheckboxWidget
validating that the schema.title
is passed as the label, fixing #3302generateXXX
functions for Form
, Theme
, Templates
and Widgets
to support using the theme with user-specified type generics, partially fixing #3072ButtonTemplates
to pass the new required registry
prop, filtering it out in the actual implementations before spreading props, fixing - #3314CheckboxWidget
to get the required
state of the checkbox from the schemaRequiresTrueValue()
utility function rather than the required
prop, fixing #3317
CheckboxWidget
missing label issue #3302CheckboxWidget
validating that the schema.title
is passed as the label, fixing #3302generateXXX
functions for Form
, Theme
, Templates
and Widgets
to support using the theme with user-specified type generics, partially fixing #3072SubmitButtonProps
and IconButtonProps
to add required registry
prop, fixing - #3314ArrayFieldTemplateItemType
to add the new totalItems
and canAdd
props, fixing #3315CustomValidator
and ErrorTransformer
types to take the full set of T
, S
, F
generics in order to accept a new optional uiSchema
property, partially fixing #3170ValidatorType
to add the F
generic to allow the validateFormData()
function to take a new optional uiSchema
parameter, partially fixing #3170
ValidatorType
interface changecustomizeValidator
and AJV6Validator
implementations to add the S
and F
generics, so that validateFormData()
can accept a new optional uiSchema
parameter that is passed to transformErrors()
and customValidate()
, partially fixing #3170customizeValidator
and AJV8Validator
implementations to add the F
generic, so that validateFormData()
can accept a new optional uiSchema
parameter that is passed to transformErrors()
and customValidate()
, partially fixing #3170ArrayFieldItemTemplate
, SubmitButtonProps
and IconButtonProps
as part of the fix for #3314 and #3315form-props.md
for children
, fixing #3322typescript.md
documentation to Advanced Customization
describing how to use custom generics as part of the fix for #3072utilty-functions.md
to add the new F
generic to all the places which needed them