diff --git a/src/web/app/components/question-types/question-edit-details-form/constsum-recipients-question-edit-details-form.component.ts b/src/web/app/components/question-types/question-edit-details-form/constsum-recipients-question-edit-details-form.component.ts
index b612217475a..e70865c9418 100644
--- a/src/web/app/components/question-types/question-edit-details-form/constsum-recipients-question-edit-details-form.component.ts
+++ b/src/web/app/components/question-types/question-edit-details-form/constsum-recipients-question-edit-details-form.component.ts
@@ -37,4 +37,12 @@ export class ConstsumRecipientsQuestionEditDetailsFormComponent
: FeedbackConstantSumDistributePointsType.NONE,
});
}
+
+ restrictPointsLength(event : InputEvent) : void {
+ const target : HTMLInputElement = event.target as HTMLInputElement;
+ if (target.value != null && target.value.length > 9) {
+ this.triggerModelChange('points', this.model.points);
+ target.value = target.value.substring(0, 9);
+ }
+ }
}
diff --git a/src/web/app/components/question-types/question-edit-details-form/num-scale-question-edit-details-form.component.html b/src/web/app/components/question-types/question-edit-details-form/num-scale-question-edit-details-form.component.html
index ce50ec942b3..8c28fc45fb4 100644
--- a/src/web/app/components/question-types/question-edit-details-form/num-scale-question-edit-details-form.component.html
+++ b/src/web/app/components/question-types/question-edit-details-form/num-scale-question-edit-details-form.component.html
@@ -1,7 +1,7 @@
diff --git a/src/web/app/components/question-types/question-edit-details-form/num-scale-question-edit-details-form.component.ts b/src/web/app/components/question-types/question-edit-details-form/num-scale-question-edit-details-form.component.ts
index 6b8d6f1700b..20cc9c9dae1 100644
--- a/src/web/app/components/question-types/question-edit-details-form/num-scale-question-edit-details-form.component.ts
+++ b/src/web/app/components/question-types/question-edit-details-form/num-scale-question-edit-details-form.component.ts
@@ -56,4 +56,15 @@ export class NumScaleQuestionEditDetailsFormComponent
}
return `[${possibleValuesString}]`;
}
+
+ restrictPointsLength(event : InputEvent, isMin : boolean) : void {
+ const target : HTMLInputElement = event.target as HTMLInputElement;
+ if (target.value != null && target.value.length > 9 && isMin) {
+ this.triggerModelChange('minScale', this.model.minScale);
+ target.value = target.value.substring(0, 9);
+ } else if (target.value != null && target.value.length > 9) {
+ this.triggerModelChange('maxScale', this.model.maxScale);
+ target.value = target.value.substring(0, 9);
+ }
+ }
}