@rjsf/validator-ajv8
Advanced tools
Changelog
5.7.1
cjs
development version, to not export the compileSchemaValidators()
function to avoid "Module not found: Can't resolve 'fs' error" issues, fixing #3668field
in the focusOnError
method in Form
validation
documentation to add a note with a web-resource to help folks work around the "Module not found: Can't resolve 'fs' error" issue for development environmentspackage-lock.json
files to bump peer-dependencies to 5.7.x
, fixing #3669Changelog
5.7.0
SelectWidget
and description for CheckboxWidget
MultiSchemaField
to use the new getDiscriminatorFieldFromSchema()
APIexperimental_defaultFormStateBehavior
prop to Form
FileWidget
to again support adding multiple files to arraysadditionalProperties
to fluent-ui theme, fixing #2777.8.x
version of @fluentui/react
maintaining backwards compatibility to version 7, fixing #3463getDiscriminatorFieldFromSchema()
(a refactor of code from MultiSchemaField
) and hashForSchema()
getDefaultFormState()
and toPathSchema()
to use getDiscriminatorFieldFromSchema()
to provide a discriminator field to getClosestMatchingOption()
calls.retrieveSchema()
internal API functions to support implementing an internal schemaParser()
API for use in precompiling schemas, in support of #3543toPathSchema()
to handle properties
in an object along with anyOf
/oneOf
, fixing #3628 and #1628computeDefaults()
into destructured props object to reduce clutter when only specifying later of the optional argument, fixing #3602computeDefaults()
to handle $ref
in an object along with anyOf
/oneOf
, fixing #3633compileSchemaValidators()
and createPrecompiledValidator()
implemented to support using precompiled validators build with AJV 8, fixing #3543custom-templates
describing how to extend the BaseInputTemplate
8.x
version of @fluentui/react
, fixing #3463validation
describing the new precompiled validators featurevalidator-ajv8.md
documentation to the api-reference
directory as well as putting it into the sidebar.js
Changelog
5.6.2
post-versioning
that caused the 5.6.1 branch to not be publishableChangelog
5.6.0
undefined
in the SelectWidget
, fixing #3595Form
to use the new validatorDataMerge()
and toErrorList()
functions instead of the now deprecated schemaUtils.mergeValidatorData()
and schemaUtils.getValidator().toErrorList()
focusOnFirstError
(3590)MultiSchemaField
to handle the OpenAPI discriminator
extension on anyOf/oneOf
fields by passing it into getClosestMatchingOption()
if it exists, fixing #3512SchemaField
function to use getSchemaType
rather than schema.type
to set the proper class name.createErrorHandler()
, toErrorList()
, toErrorSchema()
and unwrapErrorHandler()
functions from the @rjsf/validator-ajv6
and @rjsf/validator-ajv8
implementations since they were identical
mergeValidationData()
function was deprecated in favor of the new validationDataMerge()
function that uses the refactored toErrorList()
functionROOT_SCHEMA_PREFIX
constant as wellValidatorType
and SchemaUtilsType
to deprecate the toErrorList()
and mergeValidationData()
functions, respectivelygetClosestMatchingOption()
and getFirstMatchingOption()
to pass the new discriminatorField
to the getMatchingOption()
functiongetMatchingOption()
to use discriminatorField
when it is present in the options
object properties to drill into the object to detect if that one field is validSchemaUtilsType
and the associated forward functions in createSchemaUtils
to add the new discriminatorField?: string
optional parametertoIdSchema()
function to use getSchemaType(schema) === 'object'
rather than schema.type === 'object'
to get the proper pathing for ids, fixing #2044AJV6Validator
in favor of using the new functions and constant from @rjsf/utils
AJV8Validator
in favor of using the new functions and constant from @rjsf/utils
utility-functions
documentation to describe the new refactored functions as well as deprecating the mergeValidationData()
functionplayground
to properly restore liveSettings
from shared links and added a switch for noHtml5Validation
in the live settings rather than having it set to true
always
Blank
example to help users easily paste their codeChangelog
5.5.1
Form
to include the top disabled
property in the ui:submitButtonOptions
so the submit button will be disabled when the whole form is disabled. Fixes #3264.$ref
s for the toIdSchema()
, toPathSchema()
and getDefaultFormState()
functions, fixing #3560getDefaultFormState()
to handle object-based additionalProperties
with defaults using formData
in addition to values contained in a default
object, fixing #2593withExactlyOneSubschema()
inside of retrieveSchema()
to use the isValid()
function rather than validateFormData()
when determining the one-of branchplayground
to make it cleaner
disabled
flag being passed into the Form
from the incorrect disable
spellingplayground
react-app-polyfill
package from playgound
. This ends IE11 supportChangelog
5.5.0
core
core
core
FileWidget
to pass false for required
once a value has been specified, fixing #3504ObjectField
to pass the errorSchema
to the ObjectFieldTemplate
to allow custom templates access to the errorscore
, adding snapshots tests for core
as wellcore
core
core
core
errorSchema
as an optional prop on ObjectFieldTemplateProps
playground
to use Typescript, including some refactoring of code to make that job easiercustom-templates
documentation to add errorSchema
to the props for ObjectFieldTemplate
Changelog
5.4.0
ObjectFieldTemplate
to hide the titles and descriptions when displayLabel
is true (including globally), fixing #3231CheckboxWidget
to show the description
using the DescriptionFieldTemplate
, fixing #2791CheckboxesWidget
and SelectWidget
to show the label
using the TitleFieldTemplate
, fixing #2134ObjectFieldTemplate
to hide the titles and descriptions when displayLabel
is true (including globally), fixing #3231CheckboxWidget
to show the description
using the DescriptionFieldTemplate
, fixing #2791RangeWidget
to fix the label hiding bug using labelValue()
ObjectFieldTemplate
to hide the titles and descriptions when displayLabel
is true (including globally), fixing #3231CheckboxesWidget
, CheckboxWidget
, RadioWidget
and SelectWidget
to hide labels when hideLabel
is true using the new labelValue()
helper (including globally)CheckboxWidget
to show the description
using the DescriptionFieldTemplate
, fixing #2791FileWidget
to show a preview of images and a download link for non-images when the filePreview
options is set to true in the UiSchema
ArrayField
, BooleanField
, MultiSelectField
and StringField
to pass label
(read from uiSchema.title
|| schema.title
|| name
) and hideLabel
down to all of the Widgets
they render, fixing #827, #2636, #2399 and #3531ObjectField
, ObjectFieldTemplate
, ArrayFieldDescriptionTemplate
, ArrayFieldTitleTemplate
and CheckboxWidget
to hide the titles and descriptions when hideLabel
is true using the new labelValue()
helper (including globally), fixing #3231CheckboxWidget
to use the labelValue()
function for hiding labelsFieldTemplate
and ObjectFieldTemplate
to hide the titles and descriptions when displayLabel
is true (including globally), fixing #3231BaseInputTemplate
, CheckboxesWidget
, CheckboxWidget
, ColorWidget
, DateWidget
, RadioWidget
, RangeWidget
, SelectWidget
and UpDownWidget
to hide labels when hideLabel
is true using the new labelValue()
helper (including globally)
FluentLabel
component out of CheckboxesWidget
, ColorWidget
, RangeWidget
and UpDownWidget
CheckboxWidget
to show the description
using the DescriptionFieldTemplate
, fixing #2791ObjectFieldTemplate
to hide the titles and descriptions when displayLabel
is true (including globally), fixing #3231BaseInputTemplate
, CheckboxesWidget
, CheckboxWidget
, RadioWidget
, RangeWidget
and SelectWidget
to hide labels when hideLabel
is true using the new labelValue()
helper (including globally)CheckboxWidget
to show the description
using the DescriptionFieldTemplate
, fixing #2791ObjectFieldTemplate
to hide the titles and descriptions when displayLabel
is true (including globally), fixing #3231BaseInputTemplate
, CheckboxesWidget
, CheckboxWidget
, RadioWidget
, RangeWidget
and SelectWidget
to hide labels when hideLabel
is true using the new labelValue()
helper (including globally)CheckboxWidget
to show the description
using the DescriptionFieldTemplate
, fixing #2791ObjectFieldTemplate
to hide the titles and descriptions when displayLabel
is true (including globally), fixing #3231BaseInputTemplate
, CheckboxesWidget
, CheckboxWidget
, SelectWidget
and TextareaWidget
to hide labels when hideLabel
is true using the new labelValue()
helper (including globally)CheckboxWidget
to show the description
using the DescriptionFieldTemplate
, fixing #2791UiSchema
to support the optional filePreview?: boolean
option and to add a new TranslatableString.PreviewLabel
to the enums
WidgetProps
to add an optional hideLabel?: boolean
field to better support hiding labelslabelValue()
helper function to better support hiding labelstoErrorList()
and unwrapErrorHandler()
by ensuring objects before recursingAntD Customization
documentation with references to it in the form-props
and uiSchema
documentationuiSchema
documentation to add the filePreview
optionwidgets
documentation to add the new, optional hideLabel
proputility-functions
documentation to add the new labelValue()
functionChangelog
5.3.1
AltDateWidget
to remove an infinite loop caused by two conflicting effects by merging them with additional checking of original value
against the current value, fixing #3516getTestValidator()
and the schema.test.ts
file to help developersgetTestValidator()
and the schema.test.ts
file to help developersgetTestValidator()
and the schema.test.ts
file to help developersinternals
documentation to use a React ref in the example, fixing #3520contributing
documentation to describe the new development process needed for a Vite
playground, fixing #3478
package.json
files to remove npm start
in the subdirectories and change the root one to describe the new processsemantic-ui/uiSchema
documentation to switch the default for horizontalButtons
to be true per changes made in 5.3.0
Changelog
5.3.0
package.json
to properly add required dependencies explicitly which were installed implicitlyReset
function added for Programmatically Reset
action. Reset
function will reset form data and validation errors. Form data will set to default values.TimeWidget
that works for all themesInvalidObjectField
error in ObjectField
Form
, ArrayField
, ObjectField
and SchemaField
RadioWidget
's onChange return value.BaseInputTemplate
so that it shrinks a time
formatted inputBaseInputTemplate
so that it shrinks a time
formatted inputgetWidget()
to support the time
to TimeWidget
mappingTranslatableString
enums CopyButton
and InvalidObjectField
that localizes the information extracted from ObjectField
as markdownArrayFieldTemplateItemType
to add support for copying array itemsUIOptionsBaseType
to extract the addable
, orderable
, removable
, label
and duplicateKeySuffixSeparator
into a new GlobalUISchemaOptions
type that adds copyable
UIOptionsBaseType
from GlobalUISchemaOptions
UiSchema
added a new optional ui:globalOptions
prop of type GlobalUISchemaOptions
and a new UI_GLOBAL_OPTIONS_KEY
constantglobalUiOptions
object of type GlobalUISchemaOptions
in Registry
as well as CopyButton
in ButtonTemplates
getUiOptions()
and getDisplayLabel()
(and its SchemaUtilsType
counterpart) to take an optional GlobalUISchemaOptions
parameter that is used to include global options into the returned uiOptions
Programmatically Reset
button to clear states which are form data and validation errors.Date & time
example to show off the new TimeWidget
.custom-widgets-fields
and widgets
documentation to mention the new TimeWidget
and its support for the time
format.custom-templates
, internals
, uiSchema
, utility-functions
and arrays
for the new copy array feature as well as the global UI Schema options supportarrays
example to add examples for the new copyable
feature