import React from 'react' ; import { FormattedMessage } from '@kbn/i18n-react' ; export function validateServerName ( serverName ? ) { if ( ! serverName || ! serverName . trim ( ) ) { return ( < FormattedMessage id = "xpack.remoteClusters.form.errors.serverNameMissing" defaultMessage = "A server name is required." / > ) ; } return null ; }