-
-
Notifications
You must be signed in to change notification settings - Fork 5.3k
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
Server validation errors not removed after field change #5938
Comments
Hello, React admin could use it by default too, but it needs to be discussed. |
@alanpoulain your support was absolutely outstanding! |
@alanpoulain Agreed, this should be by default in react-admin. Would you like to open a PR about it? |
Hello, sorry to bump this, but i have a question. The validation errors are shown 1:1 with the field, and that's the expected behaviour and an excellent solution. Well, now try to imagine that i submit: A: Type Int The server reply with an error on the TextInput B "value not valid". The error shown on TextInput B is still there, so on submit i will get a correct save, because the form is in a correct state, but because the field is still in error state, i will also get an error in the snackbar. What do you think about it? @alanpoulain |
What you were expecting:
After this merged PR
#5778
I'm expecting that, after an error is returned from server, it will be shown on the field.
That error must disappear after the field value change, because it must be checked again on the server to validate
What happened instead:
After an error is returned from server, it appears correctly on the related field.
But that error remains after the field value change, leaving the field in error state
Steps to reproduce:
https://marmelab.com/react-admin/CreateEdit.html#submission-validation
Environment
The text was updated successfully, but these errors were encountered: