Fix - Table question column validation - #48
Open
RomainLvr wants to merge 2 commits into
Open
Conversation
Rom1-B
reviewed
Aug 4, 2026
| @@ -109,6 +170,11 @@ export class AfTableQuestion { | |||
| // stale messages from a previous attempt next to our fresh ones. | |||
| table.querySelectorAll('.invalid-tooltip').forEach(el => el.remove()); | |||
Contributor
There was a problem hiding this comment.
This cleanup also removes messages already relocated into #errors, since they keep the invalid-tooltip class and #errors sits inside table. Resubmitting without fixing anything briefly wipes the message.
Suggested change
| table.querySelectorAll('.invalid-tooltip').forEach(el => el.remove()); | |
| // Clears core's stale server errors before a blocked resubmit; skip the | |
| // ones already relocated below the table so they survive. | |
| table.querySelectorAll('.invalid-tooltip').forEach(el => { | |
| if (!el.closest('[data-af-table-errors]')) { el.remove(); } | |
| }); |
| @@ -9,6 +9,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/). | |||
|
|
|||
Contributor
There was a problem hiding this comment.
Changelog only lists the bug fix; the breaking Min rows/Max rows removal and its mandatory-question caveat aren't documented.
Suggested change
| ### Changed | |
| - **Breaking**: `Min rows`/`Max rows` removed; use a `Length is greater/less than...` validation condition instead (also mark the question mandatory to enforce a minimum, since an empty table skips validation) | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Checklist before requesting a review
Please delete options that are not relevant.
Description
Problems
/…/i, rejected values they should accept.Fixes
mergefilter, which renumbers integer keys and shifted a pattern onto the neighbouring column.patternattribute is no longer emitted. It is implicitly anchored and ignores flags, so it disagreed with both the PHP and the JS check.RegexConditionHandler, and each column's question type keeps its own format check.Min rows/Max rowsare replaced by a native condition criterion on the number of filled rows.Breaking change
The
Min rows/Max rowssettings are removed. The row count is now a native criterion, usable for validation (Length is greater than…) and for visibility.Bounds configured in 1.2.0 are ignored and must be redeclared as validation conditions on the question.