I have this validation rule
'event_start' => 'required|date|after:today',
and i can't find where to translate the word "today".
When i hit the validation rule i get this message:
Eventstart muss ein Datum nach dem today sein.
I have german locale and this is the validation translation
'after' => ':attribute muss ein Datum nach dem :date sein.',
and i can't find where to edit the word today.
If you are using FormRequest class, you can add the messages method to it like this:
public function messages()
{
return [
'event_start.after' => 'Eventstart muss ein Datum nach dem today sein.'
];
}
Or add the:
'custom' => [
'event_start' => [
'after' => 'Eventstart muss ein Datum nach dem today sein.'
]
],
to the validation.php file.
Im pretty sure, that you can't just translate the :date.
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