Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 7 commits into from
Aug 31, 2023

Conversation

brennj
Copy link
Collaborator

@brennj brennj commented Aug 16, 2023

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 brennj changed the title feat: allow consts to support single values only [JSON-Logic] Part 0: Allow consts to support single values only Aug 16, 2023
johnstonbl01
johnstonbl01 previously approved these changes Aug 24, 2023
src/tests/const.test.js Outdated Show resolved Hide resolved
src/tests/const.test.js Outdated Show resolved Hide resolved
@brennj
Copy link
Collaborator Author

brennj commented Aug 29, 2023

@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!

@brennj brennj merged commit bf07870 into main Aug 31, 2023
3 checks passed
@brennj brennj deleted the support-const-validation branch August 31, 2023 07:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants