php - Laravel 5 & validating multiple email addresses in a single field -
i know in laravel can setup validation rules input fields, example:
$return = [ 'first_name' => 'required|max:300|min:3', 'last_name' => 'required|max:300|min:3', 'email' => 'required|email, ];
is there way set kind of validation single field comma separated email addresses (test@email.com, wibble@test.com
) or need manually validate these splitting them apart , checking each email address individually?
this may looking for:
$rules = array( 'email_addresses' => 'required', 'email_addresses.*' => 'email' ); $messages = array( 'email_addresses.required' => 'email addresses required', 'email_addresses.email' => '' );
Comments
Post a Comment