From e994a9d5385fb49ed0184ec2e1e41b2218876f7f Mon Sep 17 00:00:00 2001 From: Maksym Tsymbarov Date: Thu, 13 Nov 2025 12:38:19 +0200 Subject: [PATCH] added length validation for version control name --- .../home/components/vc/entity-version-create.component.html | 3 +++ .../home/components/vc/entity-version-create.component.ts | 2 +- ui-ngx/src/assets/locale/locale.constant-en_US.json | 3 ++- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/ui-ngx/src/app/modules/home/components/vc/entity-version-create.component.html b/ui-ngx/src/app/modules/home/components/vc/entity-version-create.component.html index da4c31a1b8..ca1ddad695 100644 --- a/ui-ngx/src/app/modules/home/components/vc/entity-version-create.component.html +++ b/ui-ngx/src/app/modules/home/components/vc/entity-version-create.component.html @@ -37,6 +37,9 @@ createVersionFormGroup.get('versionName').hasError('pattern')"> {{ 'version-control.version-name-required' | translate }} + + {{ 'version-control.version-name-max-length' | translate }} + {{ 'version-control.export-credentials' | translate }} diff --git a/ui-ngx/src/app/modules/home/components/vc/entity-version-create.component.ts b/ui-ngx/src/app/modules/home/components/vc/entity-version-create.component.ts index 2042b7fdb6..3427bf0b58 100644 --- a/ui-ngx/src/app/modules/home/components/vc/entity-version-create.component.ts +++ b/ui-ngx/src/app/modules/home/components/vc/entity-version-create.component.ts @@ -86,7 +86,7 @@ export class EntityVersionCreateComponent extends PageComponent implements OnIni this.createVersionFormGroup = this.fb.group({ branch: [this.branch, [Validators.required]], versionName: [this.translate.instant('version-control.default-create-entity-version-name', - {entityName: this.entityName}), [Validators.required, Validators.pattern(/(?:.|\s)*\S(&:.|\s)*/)]], + {entityName: this.entityName}), [Validators.required, Validators.pattern(/(?:.|\s)*\S(&:.|\s)*/), Validators.maxLength(256)]], saveRelations: [false, []], saveAttributes: [true, []], saveCredentials: [true, []], diff --git a/ui-ngx/src/assets/locale/locale.constant-en_US.json b/ui-ngx/src/assets/locale/locale.constant-en_US.json index ec3ef79ef4..979953cd80 100644 --- a/ui-ngx/src/assets/locale/locale.constant-en_US.json +++ b/ui-ngx/src/assets/locale/locale.constant-en_US.json @@ -6723,7 +6723,8 @@ "runtime-failed": "Failed: {{message}}", "auto-commit-settings-read-only-hint": "Auto-commit feature doesn't work with enabled read-only option in Repository settings.", "rollback-on-error": "Rollback on error", - "rollback-on-error-hint": "If you have a large amount of entities to restore, consider disabling this option to increase performance.\n Note, if an error occurs over the course of version loading, already persisted entities (with relations, attributes, etc.) will stay as is" + "rollback-on-error-hint": "If you have a large amount of entities to restore, consider disabling this option to increase performance.\n Note, if an error occurs over the course of version loading, already persisted entities (with relations, attributes, etc.) will stay as is", + "version-name-max-length": "Name should be less than 256" }, "widget": { "widget-library": "Widgets library",