Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rendering 0 for fields when there are no errors after adding a custom validator #3233

Closed
4 tasks done
suyanhanx opened this issue Nov 8, 2022 · 0 comments · Fixed by #3234
Closed
4 tasks done

Rendering 0 for fields when there are no errors after adding a custom validator #3233

suyanhanx opened this issue Nov 8, 2022 · 0 comments · Fixed by #3234
Labels
bug needs triage Initial label given, to be assigned correct labels and assigned

Comments

@suyanhanx
Copy link
Contributor

Prerequisites

What theme are you using?

antd

Version

5.x

Current Behavior

After adding a custom validator, there will render a 0 error message when there are no errors.

image

Expected Behavior

No error messages or otherwise being rendered when there are no errors.

Steps To Reproduce

Just add a custom validator function and return the props.errors directly.
This is a sample codesandbox.
https://codesandbox.io/s/condescending-field-616vmc
Need to input something to trigger validate.

Environment

- OS:MacOS 12.6.1
- Node:v16.17.0
- npm:8.19.2

Anything else?

Nothing.

@suyanhanx suyanhanx added bug needs triage Initial label given, to be assigned correct labels and assigned labels Nov 8, 2022
suyanhanx added a commit to suyanhanx/react-jsonschema-form that referenced this issue Nov 8, 2022
heath-freenome added a commit that referenced this issue Dec 8, 2022
* fix(#3233): fix rendering 0 when there are no errors.

* fix: update snapshot and changelog

* fix: update snapshot

Co-authored-by: Heath C <51679588+heath-freenome@users.noreply.github.com>
shijistar pushed a commit to shijistar/react-jsonschema-form that referenced this issue Jun 8, 2023
…team#3234)

* fix(rjsf-team#3233): fix rendering 0 when there are no errors.

* fix: update snapshot and changelog

* fix: update snapshot

Co-authored-by: Heath C <51679588+heath-freenome@users.noreply.github.com>
shijistar pushed a commit to shijistar/react-jsonschema-form that referenced this issue Jun 8, 2023
…team#3234)

* fix(rjsf-team#3233): fix rendering 0 when there are no errors.

* fix: update snapshot and changelog

* fix: update snapshot

Co-authored-by: Heath C <51679588+heath-freenome@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug needs triage Initial label given, to be assigned correct labels and assigned
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant