Full Code Example
The code example below should be placed within your controller method.
<?php # your controller class public function store(Request $request) { $providers = ['google', 'yahoo']; if (! $emailExists) { return back() ->withInput() ->withErrors([ 'email' => 'Your email must be from either one of these providers ' . collect($providers)->join(', ', ' or ') ]); } }
Leave a reply