import React from 'react' ; import { FormattedMessage } from '@kbn/i18n-react' ; export function validateSeeds ( seeds , seedInput ? ) { const seedsHaveBeenCreated = seeds . some ( ( seed ) => Boolean ( seed . trim ( ) ) ) ; if ( seedsHaveBeenCreated ) { return null ; } if ( seedInput ) { return null ; } return ( < FormattedMessage id = "xpack.remoteClusters.form.errors.seedMissing" defaultMessage = "At least one seed node is required." / > ) ; }