mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 17:59:23 -04:00
[Index Management] Disallow special characters when creating new enrich policy (#169494)
This commit is contained in:
parent
a1955d7fbe
commit
1bc5949fb5
1 changed files with 16 additions and 0 deletions
|
@ -41,6 +41,8 @@ interface Props {
|
|||
onNext: () => void;
|
||||
}
|
||||
|
||||
const DISALLOWED_CHARS = ['"', ' ', '\\', '/', ',', '|', '>', '?', '*', '<'];
|
||||
|
||||
export const configurationFormSchema: FormSchema = {
|
||||
name: {
|
||||
type: FIELD_TYPES.TEXT,
|
||||
|
@ -58,6 +60,20 @@ export const configurationFormSchema: FormSchema = {
|
|||
)
|
||||
),
|
||||
},
|
||||
{
|
||||
validator: fieldValidators.containsCharsField({
|
||||
message: i18n.translate(
|
||||
'xpack.idxMgmt.enrichPolicyCreate.configurationStep.invalidCharactersInNameError',
|
||||
{
|
||||
defaultMessage: `Should not contain any of the following characters: {notAllowedChars}`,
|
||||
values: {
|
||||
notAllowedChars: DISALLOWED_CHARS.join(', '),
|
||||
},
|
||||
}
|
||||
),
|
||||
chars: DISALLOWED_CHARS,
|
||||
}),
|
||||
},
|
||||
],
|
||||
},
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue