Skip to content
Snippets Groups Projects
Commit b225825c authored by jojohoch's avatar jojohoch
Browse files

[player] Correct minlength and maxlength validations

parent db70040d
No related branches found
No related tags found
No related merge requests found
......@@ -23,8 +23,6 @@ export class ValidationMessageComponent implements OnInit {
requiredTrueMessage!: string;
minLengthWarnMessage!: string;
maxLengthWarnMessage!: string;
minMessage!: string;
maxMessage!: string;
constructor(private formService: FormService, private translateService: TranslateService) {}
......@@ -47,11 +45,11 @@ export class ValidationMessageComponent implements OnInit {
validators.push(Validators.required);
}
}
if (this.elementModel.min) {
validators.push(Validators.minLength(<number> this.elementModel.min));
if (this.elementModel.minLength) {
validators.push(Validators.minLength(<number> this.elementModel.minLength));
}
if (this.elementModel.max) {
validators.push(Validators.maxLength(<number> this.elementModel.max));
if (this.elementModel.maxLength) {
validators.push(Validators.maxLength(<number> this.elementModel.maxLength));
}
return validators;
}
......
......@@ -6,10 +6,8 @@
"validators": {
"inputRequired": "Eingabe erforderlich",
"inputRequiredTrue": "Ankreuzen erforderlich",
"InputTooShort": "Eingabe zu kurz",
"InputTooLong": "Eingabe zu lang",
"ValueTooSmall": "Wert zu klein",
"ValueTooBig": "Wert zu groß"
"inputTooShort": "Eingabe zu kurz",
"inputTooLong": "Eingabe zu lang"
},
"dialogTitle": {
"wrongUnitDefinitionType": "Falscher Unit-Definition-Type",
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment