My app is multi languages and I have a validation in component as follows:
$this->validate([
'name' => 'required|string|max:200',
'desc' => 'required|string|max:2000',
],[],[
'name' => trans('site.name'),
'desc' => trans('site.descrption'),
]);
I need to translate the attributes of input by trans
function!
With above code I got this error:
ErrorException
mb_strtoupper() expects parameter 1 to be string, array given
When I remove trans
the validation is worked
How can I translate the attributes
in livewire ?