-1
有人可以告訴我如何讓錯誤消息中顯示:other或:after_field。錯誤消息輸出顯示不正確
$messages = ["after_field" => "The :attribute must be greater than the :other."];
驗證規則:
$rules = ['sale_end' => 'date|after_field:sale_start']
protected function validateAfterField($attribute, $value, $parameters)
{
return Carbon::parse($value) > Carbon::parse($this->data[$parameters[0]]);
}