I am having a form and I have an array of input fields for video urls, now when I validate form if I have multiple invalid fields with video urls, I get the same message for eac
To use a custom messages from outside the validation language file, you can use it this way:
$messages = ['username.required' => 'customeError'];
$validator = \Validator::make(
$data,
['username' => 'required'],
messages
);
You can just pass an array of your custom messages as the third parameter as I have used it above. Hope this helps.