Skip to content

Increase max length for string fields to 512 characters in schema#3

Open
ashu82492 wants to merge 2 commits intoappform-io:masterfrom
ashu82492:string-field-increase-length
Open

Increase max length for string fields to 512 characters in schema#3
ashu82492 wants to merge 2 commits intoappform-io:masterfrom
ashu82492:string-field-increase-length

Conversation

@ashu82492
Copy link

Increase max length for string fields to 512 characters in schema

Description

This change increases the maximum allowed length for string fields in the schema from 255 to 512 characters on the web console.

Changes Made

Updated validation constraints in Manage.java

  • Changed @Max(255) to @Max(512) for fieldStringMaxLength parameter in the field creation endpoint (line 164)
  • Changed @Max(255) to @Max(512) for fieldStringMaxLength parameter in the field update endpoint (line 228)

Updated UI range slider in schema-details.hbs

  • Changed the HTML range input max attribute from 255 to 512 for the Max Length field (line 153)

Note

DB schema sql has length specified to 512 already so no alter required in the db schema.

Motivation

Increases flexibility in schema design for applications requiring longer string field values e.g. URLs.

@FormParam("fieldDescription") @Length(max = 255) final String fieldDescription,
@FormParam("fieldType") @NotNull final FieldType fieldType,
@FormParam("fieldStringMaxLength") @Min(1) @Max(255) final int fieldStringMaxLength,
@FormParam("fieldStringMaxLength") @Min(1) @Max(512) final int fieldStringMaxLength,
Copy link
Contributor

Choose a reason for hiding this comment

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

Move to constant example Constant.MAX_SCHEMA_ID_LENGTH,
Also in StoredEntity ?

Copy link
Author

Choose a reason for hiding this comment

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

  1. Moved to a new constant MAX_STRING_FIELD_VALUE_LENGTH.
  2. StoredEntity max field length was already set to 512, replaced with the new constant.

@ashu82492 ashu82492 force-pushed the string-field-increase-length branch from 4c413ea to 859d1a8 Compare February 16, 2026 08:56
@ashu82492 ashu82492 requested a review from tusharmndr February 16, 2026 08:59
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