refs #909 Add null validations

oggui/calendar
Alvaro Puente Mella 2024-10-09 16:58:18 +02:00
parent 8ee00eaf19
commit 5b57cf4fb2
1 changed files with 18 additions and 18 deletions

View File

@ -46,38 +46,38 @@ export class EditOrganizationalUnitComponent implements OnInit {
this.isEditMode = !!data?.uuid; this.isEditMode = !!data?.uuid;
this.generalFormGroup = this._formBuilder.group({ this.generalFormGroup = this._formBuilder.group({
name: ['', Validators.required], name: [null],
parent: [''], parent: [null],
description: [''], description: [null],
type: ['', Validators.required] type: [null]
}); });
this.additionalInfoFormGroup = this._formBuilder.group({ this.additionalInfoFormGroup = this._formBuilder.group({
comments: [''], comments: [null],
}); });
this.networkSettingsFormGroup = this._formBuilder.group({ this.networkSettingsFormGroup = this._formBuilder.group({
proxy: [''], proxy: [null],
dns: [''], dns: [null],
netmask: [''], netmask: [null],
router: [''], router: [null],
ntp: [''], ntp: [null],
p2pMode: [''], p2pMode: [null],
p2pTime: [0, Validators.min(0)], p2pTime: [null],
mcastIp: [''], mcastIp: [null],
mcastSpeed: [0, Validators.min(0)], mcastSpeed: [null],
mcastPort: [0, Validators.min(0)], mcastPort: [null],
mcastMode: [''], mcastMode: [null],
menu: [null], menu: [null],
hardwareProfile: [null], hardwareProfile: [null],
validation: [false] validation: [false]
}); });
this.classroomInfoFormGroup = this._formBuilder.group({ this.classroomInfoFormGroup = this._formBuilder.group({
location: [''], location: [null],
projector: [false], projector: [false],
board: [false], board: [false],
capacity: [0, Validators.min(0)], capacity: [null],
remoteCalendar: [null] remoteCalendar: [null]
}); });