@rjsf/validator-ajv8
Advanced tools
Changelog
5.14.2
peerDependencies
for @ant-design/icons
to also support v5, fixing #3507retrieveSchema
twice during getStateFromProps
and mustValidate
is true #3959hideError
property to the DOM element, fixing #3945hideError
property to the DOM element, fixing #3945sanitizeDataForNewSchema()
to avoid spreading strings and Arrays into the returned value when the old schema is of type string
or array
and the new schema is of type object
. Fixing #3922Changelog
5.14.1
sanitizeDataForNewSchema()
to avoid spreading strings and Arrays into the returned value when the old schema is of type string
or array
and the new schema is of type object
. Fixing #3922labelValue
to have more granular return types, fixing #3946Changelog
5.13.6
StringField
to pass hideError
prop to Widget
so that all fields are consistent. Missed this file in previous patchChangelog
5.13.5
StringField
and BooleanField
to pass hideError
prop to Widget
so that all fields are consistentChangelog
5.13.3
SelectWidget
so that filtering works by reworking how options
are passed to the underlying Select
UNSAFE_componentWillReceiveProps()
method in the Form.tsx component with an improved solution utilizing the React lifecycle methods: getSnapshotBeforeUpdate()
and componentDidUpdate()
. Fixing #1794ArrayField
implementation to never pass an undefined schema for fixed arrays to other methods, fixing #3924getSnapshotBeforeUpdate()
caused by the fix for #1794, fixing #3927toPathSchemaInternal()
util to generate correct path schemas for fixed arrays by picking up individual schemas in the items
array, fixing #3909Changelog
5.13.2
resolveAnyOrOneOfSchemas()
to not take a recurseList
anymore, and instead always pass an empty array down to resolveAllReferences()
, fixing #3902
parseSchema()
and resolveDependencies()
to no longer pass recurseList
to resolveAnyOrOneOfSchemas()
AJV8PrecompiledValidator
to add a new ensureSameRootSchema()
function that is called in both rawValidation()
and isValid()
Changelog
5.13.1
ArrayField
to move errors in the errorSchema when the position of array items changes for the insert and copy cases.Grid
container component in the ArrayFieldTemplate
component that wrapped the ArrayFieldItemTemplate
, fixing #3863SelectWidget
switches from controlled to uncontrolled when enumOptions
does not include a value, fixing #3844Grid
container component in the ArrayFieldTemplate
component that wrapped the ArrayFieldItemTemplate
, fixing #3863SelectWidget
switches from controlled to uncontrolled when enumOptions
does not include a value, fixing #3844getOptionMatchingSimpleDiscriminator()
functiongetMatchingOption
and getClosestMatchingOption
now bypass validator.isValid()
calls when simple discriminator is provided, fixing #3692FieldTemplateProps['onChange']
retrieveSchema()
to properly resolve references inside of properties
and array items
while also dealing with recursive $ref
s, fixing #3761
schemaParser()
and getClosestMatchingOption()
to pass the new recursiveRef
parameter added to internal retrieveSchema()
APIs100%
test coverage that was lost when updating to Jest 29
getDefaultFormState()
to remove an unnecessary check for formData
being an object since it is always guaranteed to be one, thereby allowing full testing coveragegetSchemaType()
to return the first schema type
when it is an array not containing 'null'
, fixing #3875validator
and precompiledValidator
tests to the restore 100%
coverage that was lost when updating to Jest 29
isValid()
for the validator
commenting out an if condition that was preventing 100%
coverage, with a TODO to fix it later@types/jest
as a global devDependency
so that developer tools properly recognize the jest function typesChangelog
5.13.0
StyleProvider
from @ant-design/cssinjs
. They need not have to install this package, its a transitive package coming from antd.import { StyleProvider } from '@ant-design/cssinjs';
const Component = () => {
return (
<StyleProvider>
<YourFormComponents />
</StyleProvider>
);
};
MultiSchemaField
to only merge top level required field fixing duplicate field and description.validateForm()
) removes previous errors if all data is now valid.isMultiple
option in MultiSchemaField
. It no longer offers multiple choice inside a select field in a oneOf
case in Chakra UI, fixing #3848Changelog
5.12.1
AJV8PrecompiledValidator.rawValidation()
to resolve root schema with formData when comparing input schema, fixing #3825MultiSchemaField
to merge all top level fields except properties for anyOf/oneOf options, fixing #3808 and #3787retrieveSchemaInternal
allOf logic for precompiled schemas to resolve top level properties fixing #3817