eclipsesource / jsonforms

Customizable JSON Schema-based forms with React, Angular and Vue support out of the box.
http://jsonforms.io
Other
2.23k stars 374 forks source link

Support async validation with ajv #1347

Open edgarmueller opened 5 years ago

edgarmueller commented 5 years ago

Describe the bug If ajv is configured to use asynchronous validation, error reporting is not working correctly, see https://github.com/epoberezkin/ajv#asynchronous-validation for more info.

To Reproduce Use any example with $async set

Expected behavior Error reporting should not break.

mlandry8 commented 5 years ago

Are there any updates on this issue? Have a hacky workaround going but it's not ideal. I see there is a solution ready in your PRs!

edgarmueller commented 5 years ago

@mlandry8 Except the open draft PR there isn't unfortunately, we simply didn't find the time to finish it. But we'll try to do so for the next minor release (which would be 2.4.0). If you already have something and you think it's a valuable addition to the framework, we always welcome contributions! Maybe you could compare it to the existing PR and check which approach would be better.

luziew commented 3 years ago

I am stuck with this problem, too. How could I work around this problem until it is fixed in the next milestone? @mlandry8 You mentioned a hacky workaround - could you give a hint on how to do it? Thanks!

sdirix commented 8 months ago

Update: While JSON Forms does not support async validation directly, there is a straightforward workaround by managing the errors outside of JSON Forms: