Closed SwapnilWankhedeMerit98 closed 15 hours ago
@SwapnilWankhedeMerit98 transformErrors()
should have worked. Do you have a codesandbox.io with an example of what you tried to get working? And what do you mean by changes in UI schema for required properties
.
I want this as custom message. Somewhere I have read to add a UIschema property for the required fields where it will take that message to be displayed. RIght now I can't share the code. WIll share the dummy example of it soon. Meanwhile if you have any solution please do suggest.
FYI, what you are showing us is the standard HTML5 validation behavior that is outside of the control of RJSF. You may want to turn it off using the noHtml5Validate flag on the Form
@SwapnilWankhedeMerit98 Did that flag help?
@heath-freenome Hey, Thank you for your suggestion. Turning off that flag, don't show those messages, but editing them and customising them is not possible so I have found a workaround. I have removed the required filled in json and displaying the error message manually by checking if field value is empty or not.
Prerequisites
What theme are you using?
core
What is your question?
Hi,
I am using RJSF for my project and I wanted custom error message for required field validation in formdata. I have tried using transformErrors but didn't work. Also I have made changes in UI schema for required properties but failed. PLease if anyone can suggest a way out would be very helpful. if possible please give a code snippet for the same.
Thanks.