[SM-240] Add max length limit on SM strings (#5823)

* Add max length limit on SM strings

* remove HTML attributes

* remove from project
This commit is contained in:
Thomas Avery 2023-08-08 12:08:39 -05:00 committed by GitHub
parent f43272f243
commit eca060d7e6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 9 additions and 9 deletions

View File

@ -7,7 +7,7 @@
</div> </div>
<bit-form-field *ngIf="!loading"> <bit-form-field *ngIf="!loading">
<bit-label>{{ "projectName" | i18n }}</bit-label> <bit-label>{{ "projectName" | i18n }}</bit-label>
<input appAutofocus formControlName="name" maxlength="1000" bitInput /> <input appAutofocus formControlName="name" bitInput />
</bit-form-field> </bit-form-field>
</span> </span>
<ng-container bitDialogFooter> <ng-container bitDialogFooter>

View File

@ -27,7 +27,7 @@ export interface ProjectOperation {
export class ProjectDialogComponent implements OnInit { export class ProjectDialogComponent implements OnInit {
protected formGroup = new FormGroup({ protected formGroup = new FormGroup({
name: new FormControl("", { name: new FormControl("", {
validators: [Validators.required, BitValidators.trimValidator], validators: [Validators.required, Validators.maxLength(500), BitValidators.trimValidator],
updateOn: "submit", updateOn: "submit",
}), }),
}); });

View File

@ -41,7 +41,7 @@
<bit-form-field *ngIf="addNewProject == true"> <bit-form-field *ngIf="addNewProject == true">
<bit-label>{{ "projectName" | i18n }}</bit-label> <bit-label>{{ "projectName" | i18n }}</bit-label>
<input formControlName="newProjectName" maxlength="1000" bitInput /> <input formControlName="newProjectName" bitInput />
</bit-form-field> </bit-form-field>
</div> </div>
<ng-container bitDialogFooter> <ng-container bitDialogFooter>

View File

@ -38,17 +38,17 @@ export interface SecretOperation {
export class SecretDialogComponent implements OnInit { export class SecretDialogComponent implements OnInit {
protected formGroup = new FormGroup({ protected formGroup = new FormGroup({
name: new FormControl("", { name: new FormControl("", {
validators: [Validators.required, BitValidators.trimValidator], validators: [Validators.required, Validators.maxLength(500), BitValidators.trimValidator],
updateOn: "submit", updateOn: "submit",
}), }),
value: new FormControl("", [Validators.required]), value: new FormControl("", [Validators.required, Validators.maxLength(3500)]),
notes: new FormControl("", { notes: new FormControl("", {
validators: [BitValidators.trimValidator], validators: [Validators.maxLength(7000), BitValidators.trimValidator],
updateOn: "submit", updateOn: "submit",
}), }),
project: new FormControl("", [Validators.required]), project: new FormControl("", [Validators.required]),
newProjectName: new FormControl("", { newProjectName: new FormControl("", {
validators: [BitValidators.trimValidator], validators: [Validators.maxLength(500), BitValidators.trimValidator],
updateOn: "submit", updateOn: "submit",
}), }),
}); });

View File

@ -8,7 +8,7 @@
<div *ngIf="!loading"> <div *ngIf="!loading">
<bit-form-field> <bit-form-field>
<bit-label>{{ "serviceAccountName" | i18n }}</bit-label> <bit-label>{{ "serviceAccountName" | i18n }}</bit-label>
<input appAutofocus formControlName="name" maxlength="1000" bitInput /> <input appAutofocus formControlName="name" bitInput />
</bit-form-field> </bit-form-field>
</div> </div>
</div> </div>

View File

@ -27,7 +27,7 @@ export class ServiceAccountDialogComponent {
protected formGroup = new FormGroup( protected formGroup = new FormGroup(
{ {
name: new FormControl("", { name: new FormControl("", {
validators: [Validators.required, BitValidators.trimValidator], validators: [Validators.required, Validators.maxLength(500), BitValidators.trimValidator],
updateOn: "submit", updateOn: "submit",
}), }),
}, },