jsonform / jsonform

Build forms from JSON Schema. Easily template-able. Compatible with Bootstrap 3 out of the box.
https://jsonform.github.io/jsonform/playground/index.html
MIT License
2.72k stars 553 forks source link

How to show error after a control value is changed, #445

Open mamta91 opened 3 months ago

mamta91 commented 3 months ago

I have a form with some controls which has validations like min, max and pattern. I am looking for a solution in which I can show error related to a fields as I changed its content.

I have not found any such solution. I tried calling submit button of form on change of controls but it is also displaying error for non-visited fields as well but I want to show errors related to current field only.

Is there any workaround for this?

sdetweil commented 3 months ago

you can add your own onChange handler to each of the fields. from the doc

Screenshot_20240115_071529_Chrome