Skip to content

feat(core): Add validate function based rule condition #2441

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

Merged
merged 3 commits into from
May 26, 2025

Conversation

lucas-koehler
Copy link
Contributor

Add a new rule condition ValidateFunctionCondition using a given validate function to evaluate the condition result. This allows using arbitrary custom logic to evaluate condition results.
This facilitates not using schema-conditions to be able to only use one pre-compiled AJV for the data schema at a later stage.

Add a new rule condition `ValidateFunctionCondition` using a given `validate` function
to evaluate the condition result. This allows using arbitrary custom logic to evaluate
condition results.
This facilitates not using schema-conditions to be able to only use one pre-compiled AJV
for the data schema at a later stage.
Copy link

netlify bot commented Apr 23, 2025

Deploy Preview for jsonforms-examples ready!

Name Link
🔨 Latest commit f502634
🔍 Latest deploy log https://app.netlify.com/projects/jsonforms-examples/deploys/682d84c728990100084b6446
😎 Deploy Preview https://deploy-preview-2441--jsonforms-examples.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@coveralls
Copy link

coveralls commented Apr 23, 2025

Coverage Status

coverage: 82.569% (+0.05%) from 82.517%
when pulling f502634 on lk/validation-functions
into 393c4dc on master.

@lucas-koehler lucas-koehler requested a review from sdirix April 23, 2025 11:00
@lucas-koehler
Copy link
Contributor Author

@sdirix I now added the additional context information being available without breaking API as described here: #2441 (comment)

Copy link
Member

@sdirix sdirix left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works for me, but there is an issue with the example

@lucas-koehler lucas-koehler force-pushed the lk/validation-functions branch from 8da42f4 to f502634 Compare May 21, 2025 07:46
@lucas-koehler lucas-koehler requested a review from sdirix May 21, 2025 07:55
@lucas-koehler
Copy link
Contributor Author

@sdirix Thanks for the review and suggestion :) The example should be fixed now.

Copy link
Member

@sdirix sdirix left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works for me!

@lucas-koehler lucas-koehler merged commit d0b1dfa into master May 26, 2025
11 checks passed
@lucas-koehler lucas-koehler deleted the lk/validation-functions branch May 26, 2025 13:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants