mercredi 28 février 2018

custom translate on values in laravel validation

I have a conditional validation on laravel 5.6:

 'body' => 'required_if:body.*.type,left',

in validation.php

"required_if"      => " :attribute is required when :other is :value",

and it a messsage like this:

text is required when type is left",

I want translate "left" word to my custom word.

Is it possible to di that?

I try these:

'attributes' => array(
   'left' => 'left2'
),

or

'value' => array(
   'left' => 'left2'
),

but no success!



from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/2COiT04
via IFTTT

Aucun commentaire:

Enregistrer un commentaire