'use strict';

module.exports = input => {
  const regex = /^[A-Za-z-]+$/g;

  if (!input) {
    return 'You must provide an input';
  }

  return regex.test(input) || "Please use only letters, '-' and no spaces";
};

'use strict';

module.exports = (input, allowSnakeCase = false) => {
  const regex = allowSnakeCase ? /^[A-Za-z-|_]+$/g : /^[A-Za-z-]+$/g;

  if (!input) {
    return "You must provide an input";
  }

  return regex.test(input) || "Please use only letters, '-' and no spaces";
};

Add snake_case param for validating generate input
Add snake_case param for validating generate input