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
@DharamveerYadav If you turn on live validate (as provided in this playground), you'll see the validation errors going away using your steps. This is not a bug since validation is an active behavior that must be done on the form.
Hi @heath-freenome Thank you for your reply. My point is if we remove an errored out array item and add a new array item as mentioned in point number 5, It should create fresh or new array object, without any array.
live validation work if validate and fill the same field. here we are creating new array item.
Hi @heath-freenome Thank you for your reply. My point is if we remove an errored out array item and add a new array item as mentioned in point number 5, It should create fresh or new array object, without any array. live validation work if validate and fill the same field. here we are creating new array item.
@DharamveerYadav if you really want the error to go away on change, then simply use the liveValidation feature. Without turning on that feature, no validation re-occurs unless the user explicitly causes it to happen themselves (usually via the submit). Internally, the previous validation objects that were manually generated are based on index paths, so deleting and adding a new field satisfies that index path. So, unless you revalidate, the errors objects remain in the Form state, causing the error to be displayed.
Prerequisites
What theme are you using?
core
Version
5.x
Current Behavior
Currently error messages are not getting reset for ArrayFieldItemTemplate, If I have done validation and do removal and new addition.
Expected Behavior
Error messages should reset.
Steps To Reproduce
Ideally error message should not come again, if this is a new row. Basically schema is containing errors and not resetting remove and add operation.
Environment
Anything else?
https://rjsf-team.github.io/react-jsonschema-form/
The text was updated successfully, but these errors were encountered: