Solution for "laravel validation message attribute"

if (request('event') == null) { $validator->errors()->add('event', 'Please select an event'); }

how to add an custom error to validater error in laravel

$rules = [ 'name' => 'required', 'email' => 'required|email', 'message' => 'required|max:250', ]; $customMessages = [ 'required' => 'The :attribute field is required.' ]; $this->validate($request, $rules, $customMessages); //@sujay

laravel validation custom message example

Similar codes for "laravel validation message attribute"


Latest 'PHP' questions

Added before "laravel validation message attribute"