Input[type = ‘text’] accept alphabets only instead of alphabets and whitespaces

I want to make my input text field accept alphabets only and space(at least one white space), not only alphabets, i use this expression but only alphabets works but if I put spaces between the text, doesnt work.

const isAlphabet = (input) => {
    const re = /^[a-zA-Z]+$/;
    return re.test(input);
  }
``