I am developing a Laravel application. What I am doing in my application is that I am trying to override the custom validation rule message.
I have validation rules like this in the request class:
[
'name'=> [ 'required' ],
'age' => [ 'required', new OverAge() ],
];
Normally, we override the error message of the rules like this:
return [
'title.required' => 'A title is required',
'body.required' => 'A message is required',
];
But how can I do that to the custom validation rule class?
age.over_age
? – Mccorkle