You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix: Better validation messages using schema/uiSchema title if it exists (rjsf-team#3337)
* use title if available for validation errors
* add title tests to validator-ajv8 validator tests
* use scoped lodash/get
* set verbose in createAjvInstance
* use parentSchema for getting title
* remove . in validator tests
* rename local vars
* remove duplicate local var
* Update packages/validator-ajv8/test/validator.test.ts
Co-authored-by: Heath C <[email protected]>
* use params.missingProperty for currentProperty
* check uiSchema for ui:title override in transformRJSFValidationErrors
* revert package-lock.json files
* Update packages/validator-ajv8/src/validator.ts
Co-authored-by: Heath C <[email protected]>
* Update packages/validator-ajv8/src/validator.ts
Co-authored-by: Heath C <[email protected]>
* add getUiOptions import
* remove type arguments in call to getUiOptions
* revert to leading period in default stack message
* revert lock files
* test for ajv8 ErrorObject optional fields
* use array notation get
* update CHANGELOG
* Update CHANGELOG.md
Co-authored-by: Heath C <[email protected]>
* Update packages/validator-ajv8/package.json
Co-authored-by: Heath C <[email protected]>
* Update packages/validator-ajv8/src/validator.ts
Co-authored-by: Heath C <[email protected]>
* Update packages/validator-ajv8/src/validator.ts
Co-authored-by: Heath C <[email protected]>
* move import
* Update packages/validator-ajv8/test/validator.test.ts
* Update CHANGELOG.md
Co-authored-by: Heath C <[email protected]>
Copy file name to clipboardExpand all lines: CHANGELOG.md
+1Lines changed: 1 addition & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -22,6 +22,7 @@ should change the heading of the (upcoming) version to include a major version b
22
22
23
23
## @rjsf/validator-ajv8
24
24
- Remove alias for ajv -> ajv8 in package.json. This fixes [#3215](https://github.com/rjsf-team/react-jsonschema-form/issues/3215).
25
+
- Updated `AJV8Validator#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 [#3246](https://github.com/rjsf-team/react-jsonschema-form/issues/3246)
0 commit comments