rjsf-team / react-jsonschema-form

A React component for building Web forms from JSON Schema.
https://rjsf-team.github.io/react-jsonschema-form/
Apache License 2.0
14.38k stars 2.19k forks source link

Validation error messages are inconsistent #4348

Closed guilhermecastros closed 4 weeks ago

guilhermecastros commented 1 month ago

Prerequisites

What theme are you using?

validator-ajv8

Version

5.x

Current Behavior

Error messages are not being generated correctly. Curretly the title is not being placed on the correct position.

For instance I have a required property that is called a, which its title is First name.

The error message that I am getting is

current: must hFirst nameve required property 'a' expected: must have required property 'First name'

Expected Behavior

Error messages should be consistent & property title should be placed on the correct position.

must have required property 'First name'

Steps To Reproduce

  1. Open playground.

  2. You will see that the schema defines properties a & r, which are required.

  3. The error messages being displayed are not correct & not readable

  4. image

  5. must hFirst nameve required property 'a'

  6. must have Last nameequired property 'r'

Environment

- OS:
- Node:
- npm:

Anything else?

No response