Validation in shema and uischema

Hi everyone, I wonder Can we put validation in Uishema, If possible, what is the advantage of putting validation in Uishema and in Schema?

Hi @autinn123, the off-the-shelf renderer sets don’t support any validation in the UI Schema. If you want to do something like this, then you need to develop custom renderers.

Note that JSON Forms uses AJV to validate the data against the handed over JSON Schema. So any JSON Schema compatible validation rules in the JSON Schema will already work. If you add your own validation rules to the UI Schema then you also need to manage the execution of that validation.

1 Like