how to add an custom error to validater error in laravel
snippet in php

how to add an custom error to validater error in laravel

user6783

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