New feature
Added the validator-ata package to give users an alternative validation system
@rjsf/core
- Updated
Formto stop usingremoveOptionalEmptyObjects()and deprecatingremoveEmptyOptionalObjectsprop
@rjsf/utils
- Adopted the
svelte-jsonschema-formalgorithm foromitExtraData(), adding in support for the code fromremoveOptionalEmptyObjects(), exporting theisValueEmpty()function from the library - Deprecated the
removeOptionalEmptyObject()andtoPathSchema()functions,toPathSchema()onSchemaUtilsTypeand thePathSchematype - Added
relaxOptionsForScoring()utility that normalizes aoneOf/anyOfoption list for scoring with optional$refs resolution
Converts boolean schemas to object equivalents and widensadditionalProperties: false → trueso thatgetClosestMatchingOptiondoes not produce false negatives when form data contains keys not declared inproperties - Fixed
resolveAnyOrOneOfSchemas(called byschemaParserwithexpandAllBranches=true) to usegetFirstMatchingOptionon the options returned fromrelaxOptionsForScoring()so that they are captured for precompiled validators - Extracted the
shallowAllOfMerge()function fromretrieveSchema.tsinto its own file for additional use inomitExtraData.ts
@rjsf/validator-ajv8
- Added integration tests verifying that
getFirstMatchingOption,getClosestMatchingOption, andomitExtraDatawork correctly when given anAJV8PrecompiledValidatorcompiled from aoneOfschema whose branches carryadditionalProperties: false(both direct options and options defined via$ref)
@rjsf/validator-ata
- Added
@rjsf/validator-ata, anata-validatorbacked alternative to@rjsf/validator-ajv8. The public surface mirrors the AJV package (customizeValidator(),ValidatorType<T, S, F>, custom formats,transformErrors,customValidate,suppressDuplicateFiltering), so swapping the import is enough for existing forms to keep working. AJV-only options (AjvClass,ajvFormatOptions,ajvOptionsOverrides) are replaced byataOptionsOverrides, and theata-validatorformat set is always installed. Depends onata-validator^0.17.4, which carries stableATA####error codes and rich error metadata (expected,received,schemaSource,dataFrame,suggestion,docUrl) thattransformErrorscan consume. See the validator-ata API reference for the full list of differences (#5063) - Wired through precompiled validators.
compileSchemaValidatorscompiles a schema to a standalone module viaata-validator'sbundleStandalone, andcreatePrecompiledValidatorloads it as aValidatorType, mirroring@rjsf/validator-ajv8. Error output matches the non-precompiled validator, including per-field errors for schema-valuedadditionalProperties(ata-validator>= 0.17.4); an invalidanyOfreports a single error on the field, the same as the runtime path. Custom formats in a precompiled bundle must be a RegExp or string pattern, since a function checker cannot be serialized into the standalone bundle (#5078)
Dev / docs / playground
- Added a
validator-ataAPI reference page underapi-referencedescribing the package and its differences fromvalidator-ajv8(#5063) - Documented the
compileSchemaValidatorsandcreatePrecompiledValidatorAPIs on thevalidator-ataAPI reference page (#5078) - Added
ATAandATA (coerceTypes)choices to the playground validator picker (#5063) - Removed the
ataValidatorBrowserCompatworkaround from the playground Vite config. The bump toata-validator^0.18.2makes the patch unnecessary, since the validator no longer touches the filesystem at module init. See ata-core/ata-validator#25 - Updated the
form-props.mdandutility-functions.mdto document the deprecations anduiSchema.mdto cleanup theenumNamesdocs slightly - Switched out
eslint/prettierforOxLint/Oxfmtandjest/babelforvitest