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 leave a functi?

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.