Skip to content

[v17] Hide validation errors on newly added sections#53530

Merged
bl-nero merged 2 commits intobranch/v17from
bl-nero/backport-53224-branch/v17
Apr 2, 2025
Merged

[v17] Hide validation errors on newly added sections#53530
bl-nero merged 2 commits intobranch/v17from
bl-nero/backport-53224-branch/v17

Conversation

@bl-nero
Copy link
Contributor

@bl-nero bl-nero commented Mar 28, 2025

Backport #53224 to branch/v17

* Add ValidationSuspender component

This component makes it possible to conditionally hide validation errors
in a subset of form fields. It is required by an upcoming PR to the role
editor that satisfies the UX requirement of not showing validation
errors on newly added sections until the next explicit validation is
requested.

Also: add type information to useRule.

* Hide validation errors on newly added sections

Uses ValidationSuspender to hold validation errors from being displayed
on fields that belong to sections added while the validator is
validating. The newly invalid inputs will be marked as invalid only
after another explicit validation call (for example, when the user
attempts to save data).

* Post-merge test fix
@bl-nero bl-nero added the no-changelog Indicates that a PR does not require a changelog entry label Mar 28, 2025
@bl-nero bl-nero marked this pull request as ready for review April 1, 2025 16:38
@github-actions github-actions bot requested review from avatus and rudream April 1, 2025 16:39
@public-teleport-github-review-bot public-teleport-github-review-bot bot removed the request for review from rudream April 2, 2025 10:45
@bl-nero
Copy link
Contributor Author

bl-nero commented Apr 2, 2025

Retested on existing and new roles. Merging.

@bl-nero bl-nero added this pull request to the merge queue Apr 2, 2025
Merged via the queue into branch/v17 with commit 870b523 Apr 2, 2025
41 checks passed
@bl-nero bl-nero deleted the bl-nero/backport-53224-branch/v17 branch April 2, 2025 11:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport no-changelog Indicates that a PR does not require a changelog entry size/md ui

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

Comments