name: validateRecipientGroupName()

in dashboards-notifications/public/pages/Emails/components/forms/CreateRecipientGroupForm.tsx [57:124]


              name: validateRecipientGroupName(props.name),
            });
          }}
        />
      </EuiFormRow>

      <EuiSpacer size="m" />
      <EuiFormRow
        label={
          <span>
            Description - <i style={{ fontWeight: 'normal' }}>optional</i>
          </span>
        }
        style={{ maxWidth: '650px' }}
      >
        <>
          <EuiText size="xs" color="subdued">
            Describe the purpose of the channel.
          </EuiText>
          <EuiTextArea
            fullWidth
            data-test-subj="create-recipient-group-form-description-input"
            placeholder="What is the purpose of this recipient group?"
            style={{ height: '4.1rem' }}
            value={props.description}
            onChange={(e) => props.setDescription(e.target.value)}
          />
        </>
      </EuiFormRow>

      <EuiSpacer size="m" />
      <EuiFormRow
        label="Emails"
        style={{ maxWidth: '650px' }}
        error={props.inputErrors.emailOptions.join(' ')}
        isInvalid={props.inputErrors.emailOptions.length > 0}
      >
        <>
          <EuiText size="xs" color="subdued">
            Select or type in one or more email addresses.
          </EuiText>
          <EuiComboBox
            placeholder="Email addresses"
            data-test-subj="create-recipient-group-form-emails-input"
            fullWidth
            options={props.emailOptions}
            selectedOptions={props.selectedEmailOptions}
            onChange={props.setSelectedEmailOptions}
            onCreateOption={(searchValue, flattenedOptions) =>
              onComboBoxCreateOption(
                searchValue,
                flattenedOptions,
                props.emailOptions,
                props.setEmailOptions,
                props.selectedEmailOptions,
                props.setSelectedEmailOptions,
                (options) =>
                  props.setInputErrors({
                    ...props.inputErrors,
                    emailOptions: validateRecipientGroupEmails(options),
                  })
              )
            }
            customOptionText={'Add {searchValue} as an email address'}
            isClearable={true}
            isInvalid={props.inputErrors.emailOptions.length > 0}
            onBlur={() => {
              props.setInputErrors({