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'] = '[email protected],[email protected]';
$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'] = '[email protected]|[email protected]';
$request->validate([
'emails' => [new StringOfEmails('|')],
]);
The MIT License (MIT). Please see License File for more information.