Custom renderer and default validation

Let’s say I created my custom renderers but I want to use the custom validation that is provided out of the box. Is this possible?

Hi @Icenwharth,

you mean you want to use a custom renderer but reuse the integrated validation of JSON Forms? This is of course possible! Note that there is absolutely no difference between off-the-shelf renderers provided by us and a custom renderer. Both use exactly the same API etc.

When you implement a custom renderer you will get an errors prop handed over. This is a string with the error message. If it is falsy then there is no error to show for the control. In case it has some content you can directly show this as the error message.

1 Like