mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-02-25 18:55:31 -06:00
Fixed a couple of SonarQube issues.
This commit is contained in:
committed by
Akshay Joshi
parent
43022b7aa2
commit
b128ba2f57
@@ -466,7 +466,7 @@ export default class ServerSchema extends BaseUISchema {
|
||||
/* Hostname, IP address validate */
|
||||
if (state.host) {
|
||||
// Check for leading and trailing spaces.
|
||||
if (/^\s|\s$/.test(state.host)){
|
||||
if (/(^\s)|(\s$)/.test(state.host)){
|
||||
errmsg = gettext('Host name must be valid hostname or IPv4 or IPv6 address.');
|
||||
setError('host', errmsg);
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user