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-8414: Fix required validation not working in Data Grid #105

Merged
merged 8 commits into from
Sep 7, 2024

Conversation

mikekotikov
Copy link
Contributor

Link to Jira Ticket

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

Description

What changed?

Added check for array data values in required validation

Why have you chosen this solution?

Use this section to justify your choices

Breaking Changes / Backwards Compatibility

Use this section to describe any potentially breaking changes this PR introduces or any effects this PR might have on backwards compatibility

Dependencies

@formio/js:5646

How has this PR been tested?

Automated tests are added in @formio/js PR

Checklist:

  • I have completed the above PR template
  • 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

Copy link
Contributor

@brendanbond brendanbond left a comment

Choose a reason for hiding this comment

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

LGTM but why no tests?

@brendanbond
Copy link
Contributor

LGTM but why no tests?

Oh, I see your comment re: formio.js cool cool - I think it would be good to duplicate those though

Copy link
Contributor

@brendanbond brendanbond left a comment

Choose a reason for hiding this comment

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

Can we discuss in dev support? At first glance, I'm concerned that the core library shouldn't really be dealing with instance in any meaningful way, we need to derive these types of state from the JSON if at all possible. But I also could be misunderstanding how your solution fits together, so if you could take me through it that would be great!

return false;
}

const isArrayDataComponent = dataValue.every(_isPlainObject);
Copy link
Contributor

Choose a reason for hiding this comment

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

Would it be possible to use the existing getModelType family of functions here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@brendanbond would be problematic to use the mentioned function here, since a couple of upper functions recieve only 'value' from context, but in order to use this func, we need a 'component'.
Do you think it's worth changing upper functions to recieve component/whole context object?

@brendanbond
Copy link
Contributor

I'm having trouble actually reproducing this issue. @mikekotikov I'm going to wait on this until we review this w/ the QA folks and see if this problem has changed or been resolved

@brendanbond brendanbond merged commit d4636f0 into master Sep 7, 2024
8 checks passed
lane-formio pushed a commit that referenced this pull request Sep 25, 2024
…d_datagrid

FIO-8414: Fix required validation not working in Data Grid
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.

2 participants