jakeryansmith/validate-string-of-emails

A Laravel validator for delimiter-separated list of emails.

1.0.0 2019-10-14 17:32 UTC

This package is auto-updated.

Last update: 2025-07-12 05:31:35 UTC


README

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('|')],
]);

License

The MIT License (MIT). Please see License File for more information.