remoteoss / json-schema-form

https://json-schema-form.vercel.app
MIT License
85 stars 6 forks source link

[JSON-Logic] Part 0: Allow consts to support single values only #34

Closed brennj closed 1 year ago

brennj commented 1 year ago

Part 1 of merging JSON Logic schemas in, but this is really its own standalone piece of work.

Today if we have a const value in a schema, it doesn't take into account validations to only allow that value.

With this PR, it adds that functionality to cause an error, also where you can define the custom error using x-jsf-errorMessage.const.

Please see the tests for sample schemas on how to make this work.

brennj commented 1 year ago

@sandrina-p are you the admin on this repo? Can we change it so that new commits dismiss old reviews?

if you or @johnstonbl01 can give this a "reapproval" i think we can merge now, green internally now!