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  How to create a string in Python?

Leave a Reply

Your email address will not be published. Required fields are marked *

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