Untitled
unknown
plain_text
3 years ago
1.5 kB
8
Indexable
checkValidity() {
console.log(this.initParamForm);
if (this.recordName == "WebServices") {
//Enable is empty
if (this.initParamForm.value["webservices.enable"] === this.webservicesEnable) {
this.toastr.error(this.translateService.instant("webservicesEnableEmpty"));
return false;
}
else if (
this.initParamForm.value["webservices.enable"] !== "Y" && this.initParamForm.value["webservices.enable"] !== "N" &&
this.initParamForm.value["webservices.enable"] !== "y" &&
this.initParamForm.value["webservices.enable"] !== "n"
) {
console.log(this.initParamForm.value["webservices.enable"]);
this.toastr.error(this.translateService.instant("webservicesEnableIncorrectValue"));
return false;
};
const PORT = parseInt(this.initParamForm.value["webservices.port"]);
if (isNaN(PORT)) {
console.log(this.initParamForm.value["webservices.port"]);
this.toastr.error(this.translateService.instant("webservicesPortIncorrectValue"));
return false;
}
else if (this.initParamForm.value["webservices.port"] === this.webservicesPort) {
this.toastr.error(this.translateService.instant("webservicesPortEmpty"));
return false;
};
}
}
Editor is loading...