Support the ongoing development of Laravel.io →
posted 8 years ago
Validation

Is it possible to define a custom message for the exists:table,id rule? I tried the following

public function messages()
{
    return [
        'items.*.product_id' => [
            'exists'=> 'Not found' // not working
            'exists:products' => 'Not found' // not working
            'exists:products,id' => 'Not found' // not working
        ]
    ];
}
Last updated 3 years ago.
0

Sign in to participate in this thread!

PHPverse

Your banner here too?

notflip notflip Joined 2 Sep 2014

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2025 Laravel.io - All rights reserved.