UI: fixed device profile create/update form validation

This commit is contained in:
rusikv 2024-07-17 18:12:58 +03:00
parent 90d945cb2c
commit 7addeaf96c

View File

@ -121,7 +121,8 @@ export class DeviceProfileTransportConfigurationComponent implements ControlValu
} }
public validate(c: UntypedFormControl): ValidationErrors | null { public validate(c: UntypedFormControl): ValidationErrors | null {
return (this.deviceProfileTransportConfigurationFormGroup.valid) ? null : { return (this.transportType === DeviceTransportType.DEFAULT ||
this.deviceProfileTransportConfigurationFormGroup.valid) ? null : {
configuration: { configuration: {
valid: false, valid: false,
}, },