[Maps][File upload] Add validation check that ensure index name has been provided (#99118)
This commit is contained in:
parent
c7977614ed
commit
7a92ea3e10
|
@ -23,6 +23,12 @@ export function checkIndexPatternValid(name: string) {
|
|||
}
|
||||
|
||||
export const validateIndexName = async (indexName: string) => {
|
||||
if (!indexName) {
|
||||
return i18n.translate('xpack.fileUpload.indexNameRequired', {
|
||||
defaultMessage: 'Index name required',
|
||||
});
|
||||
}
|
||||
|
||||
if (!checkIndexPatternValid(indexName)) {
|
||||
return i18n.translate('xpack.fileUpload.indexNameContainsIllegalCharactersErrorMessage', {
|
||||
defaultMessage: 'Index name contains illegal characters.',
|
||||
|
|
Loading…
Reference in a new issue