diff --git a/src/NewCommand.php b/src/NewCommand.php index 533ae7de..3c33cf9e 100644 --- a/src/NewCommand.php +++ b/src/NewCommand.php @@ -73,6 +73,9 @@ protected function interact(InputInterface $input, OutputInterface $output) label: 'What is the name of your project?', placeholder: 'E.g. example-app', required: 'The project name is required.', + validate: fn ($value) => preg_match('/[^\pL\pN\-_.]/', $value) !== 0 + ? 'The name may only contain letters, numbers, dashes, underscores, and periods.' + : null, )); }