Skip to content

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

4 participants