diff --git a/src/CliProgram/Validation/Validators/EmailValidator.php b/src/CliProgram/Validation/Validators/EmailValidator.php new file mode 100644 index 0000000..762d82e --- /dev/null +++ b/src/CliProgram/Validation/Validators/EmailValidator.php @@ -0,0 +1,23 @@ +setValue($value); + return true; + } +} \ No newline at end of file diff --git a/tests/Commands/Email.php b/tests/Commands/Email.php new file mode 100644 index 0000000..c0d8fbb --- /dev/null +++ b/tests/Commands/Email.php @@ -0,0 +1,34 @@ +addArgument( + 'email', + InputArgument::REQUIRED, + 'The email address', + null, + new EmailValidator() + ); + } + /** + * @inheritDoc + */ + protected function execute (InputInterface $input, OutputInterface $output): int { + $output->writeln('' . $input->getArgument('email') . ''); + return Command::SUCCESS; + } +} \ No newline at end of file