fix(ui) - elastic form validate host
This commit is contained in:
parent
1248aea5d2
commit
21eec58af3
1 changed files with 2 additions and 2 deletions
|
|
@ -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 &&
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue