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

BaseFormElement: Only run validators if there's a value #121

Merged
merged 4 commits into from Mar 21, 2023

Conversation

nilmerg
Copy link
Member

@nilmerg nilmerg commented Mar 20, 2023

The counterpart for Icinga/ipl-validator#29

@nilmerg nilmerg self-assigned this Mar 20, 2023
@cla-bot cla-bot bot added the cla/signed label Mar 20, 2023
@nilmerg nilmerg force-pushed the do-not-run-validators-for-empty-values-period branch from 855b96f to eb87749 Compare March 20, 2023 16:12
@nilmerg nilmerg force-pushed the do-not-run-validators-for-empty-values-period branch from eb87749 to d11d879 Compare March 21, 2023 08:12
@nilmerg nilmerg force-pushed the do-not-run-validators-for-empty-values-period branch 2 times, most recently from 23f3622 to c221d5c Compare March 21, 2023 10:00
lippserd
lippserd previously approved these changes Mar 21, 2023
yhabteab
yhabteab previously approved these changes Mar 21, 2023
@nilmerg nilmerg dismissed stale reviews from yhabteab and lippserd via ca03c20 March 21, 2023 12:54
@nilmerg nilmerg force-pushed the do-not-run-validators-for-empty-values-period branch from c221d5c to ca03c20 Compare March 21, 2023 12:54
@nilmerg
Copy link
Member Author

nilmerg commented Mar 21, 2023

I've changed FieldsetElement::hasValue() so that it doesn't rely on what getValue() returns. This also fixes that nested fieldsets can't be empty once they have elements, as verified by the new test testNestedFieldsetsAlsoOnlyHaveAValueIfOneOfTheirElementsHaveOne.

@nilmerg nilmerg merged commit 63d5404 into master Mar 21, 2023
13 checks passed
@nilmerg nilmerg deleted the do-not-run-validators-for-empty-values-period branch March 21, 2023 15:38
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.

None yet

3 participants