Fixed SonarQube issues.

This commit is contained in:
Aditya Toshniwal
2022-09-12 11:28:00 +05:30
committed by Akshay Joshi
parent 76a6feb2e7
commit 93f5fbc797
6 changed files with 34 additions and 153 deletions

View File

@@ -859,13 +859,13 @@ define([
return null;
},
number_validate: function(value, field) {
if (!/^-?[0-9]+(\.?[0-9]*)?$/.test(value)) {
if (!/^-?\d+(\.?\d*)$/.test(value)) {
return pgadminUtils.sprintf(pgAdmin.Browser.messages.MUST_BE_NUM, field.label);
}
return this.check_min_max(value, field);
},
integer_validate: function(value, field) {
if (!/^-?[0-9]*$/.test(value)) {
if (!/^-?\d*$/.test(value)) {
return pgadminUtils.sprintf(pgAdmin.Browser.messages.MUST_BE_INT, field.label);
}
return this.check_min_max(value, field);