From 21eec58af3abada9a49f178b0884f869d45aae67 Mon Sep 17 00:00:00 2001 From: Shekar Siri Date: Thu, 27 Jan 2022 00:13:42 +0530 Subject: [PATCH] fix(ui) - elastic form validate host --- frontend/app/types/integrations/elasticsearchConfig.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/frontend/app/types/integrations/elasticsearchConfig.js b/frontend/app/types/integrations/elasticsearchConfig.js index f8a22df32..628946047 100644 --- a/frontend/app/types/integrations/elasticsearchConfig.js +++ b/frontend/app/types/integrations/elasticsearchConfig.js @@ -1,5 +1,5 @@ import Record from 'Types/Record'; -import { validateIP } from 'App/validate' +import { validateURL } from 'App/validate' export const API_KEY_ID_LENGTH = 20; export const API_KEY_LENGTH = 22; @@ -20,7 +20,7 @@ export default Record({ }), methods: { validateKeys() { - return this.apiKeyId.length === API_KEY_ID_LENGTH && this.apiKey.length === API_KEY_LENGTH && validateIP(this.host); + return this.apiKeyId.length === API_KEY_ID_LENGTH && this.apiKey.length === API_KEY_LENGTH && validateURL(this.host); }, validate() { return this.host !== '' && this.apiKeyId !== '' && this.apiKey !== '' && this.indexes !== '' && !!this.port &&