For array validation messages, is there a way to display the value as opposed to the attribute? Doing so without using a custom validator.
Example:
$messages = [
‘*' => ':value is invalid.’
]
This would output something like "email@address is invalid".
Thanks for your help!
In case anyone is still looking with the latest of Laravel versions, the answer is to use the :input
parameter in your message output:
'between' => 'The :attribute value :input is not between :min - :max.'
Docs: https://laravel.com/docs/5.7/validation#custom-error-messages
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With