Reputation: 1911
I am using cviebrock for validating image size in laravel. And thats working fine. But I want to customize the error message.
I created an array of message
$messages = array(
'image-size' => 'My custome message.',
);
and passed to
$validation = Validator::make(array($file => $fileObj), array($file => $rules), $messages);
But thats not working.
-Thanks Arun
Upvotes: 2
Views: 476
Reputation: 5730
You're using the wrong name, it should be with an underline, like
$messages = array(
'image_size' => 'My custome message.',
);
Upvotes: 2