You can install the package via composer:
composer require jakeryansmith/laravel-validate-emails
You can validate a string of emails separated by a comma.
$request['emails'] = 'dwightschrute@dundermifflin.com,jimhalpert@dundermifflin.com';
$request->validate([
'emails' => [new StringOfEmails()],
]);
You can also pass in your own delimiter if needed. In this example we are using the '|' pipe character.
$request['emails'] = 'dwightschrute@dundermifflin.com|jimhalpert@dundermifflin.com';
$request->validate([
'emails' => [new StringOfEmails('|')],
]);
The MIT License (MIT). Please see License File for more information.