Skip to content

PHP code snippet – How to add an custom error to validater error in laravel?

if (request('event') == null) {
    $validator->errors()->add('event', 'Please select an event');
}
See also  Python code snippet - How to deploy to heroku djangorest framework app?

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.