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

FIO 7964: add resource based select component validation #1714

Open
wants to merge 18 commits into
base: master
Choose a base branch
from

Conversation

brendanbond
Copy link
Contributor

Link to Jira Ticket

https://formio.atlassian.net/browse/FIO-7964

Description

The bug in question involves select components that use "resource" as a dataSrc. This PR adds a database-level validation function (similar to validateUnique or validateRecaptcha) to query the database for the referenced resource and validate the submission's options.

Dependencies

@formio/core#52

How has this PR been tested?

I added automated tests covering a simple use case, but we should go further in adding test cases around more complex configurations of this component.

Checklist:

  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation (if applicable)
  • My changes generate no new warnings
  • My changes include tests that prove my fix is effective (or that my feature works as intended)
  • New and existing unit/integration tests pass locally with my changes
  • Any dependent changes have corresponding PRs that are listed above

package.json Outdated Show resolved Hide resolved
Copy link
Contributor

@AlexeyNikipelau AlexeyNikipelau left a comment

Choose a reason for hiding this comment

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

Also, please, resolve merge conflicts

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.

None yet

2 participants