4

我在 laravel 5.6 上有条件验证:

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

在validation.php

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

它返回如下消息:text is required when type is left

我想将“左”这个词翻译成我的自定义词。

有可能这样做吗?

我试试这些:

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

或者

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

但没有成功!

4

0 回答 0