Skip to content

[stable1.0] fix: add validation for columnDto#2715

Open
backportbot[bot] wants to merge 1 commit into
stable1.0from
backport/2414/stable1.0
Open

[stable1.0] fix: add validation for columnDto#2715
backportbot[bot] wants to merge 1 commit into
stable1.0from
backport/2414/stable1.0

Conversation

@backportbot

@backportbot backportbot Bot commented Jun 10, 2026

Copy link
Copy Markdown

Backport of PR #2414

@backportbot backportbot Bot requested review from blizzz and enjeck as code owners June 10, 2026 13:50
@backportbot backportbot Bot requested a review from samin-z June 10, 2026 13:50
@backportbot backportbot Bot added the 3. to review Waiting for reviews label Jun 10, 2026
@enjeck enjeck force-pushed the backport/2414/stable1.0 branch from 171c658 to 81dbfd3 Compare June 16, 2026 05:22
Signed-off-by: samin-z <samin.zavarkesh@gmail.com>
@enjeck enjeck force-pushed the backport/2414/stable1.0 branch from 81dbfd3 to 992e612 Compare June 16, 2026 06:23

@enjeck enjeck left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Also, tables-import-export-scheme is failing.
This needs to be fixed in main too (#2414), i think?

Comment on lines +19 to +20
if ($textMaxLength !== null && $textMaxLength < 0) {
throw new BadRequestError('Maximum text length must be greater than or equal to 0.');

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

-1 is the sentinel value for "no maximum length" (e.g. existing/imported schemes), so only values below -1 are invalid.

Suggested change
if ($textMaxLength !== null && $textMaxLength < 0) {
throw new BadRequestError('Maximum text length must be greater than or equal to 0.');
if ($textMaxLength !== null && $textMaxLength < -1) {
throw new BadRequestError('Maximum text length must be greater than or equal to 0.');

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to review Waiting for reviews

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants