📌  相关文章
📜  Laravel 验证自定义消息 - PHP 代码示例

📅  最后修改于: 2022-03-11 14:54:49.104000             🧑  作者: Mango

代码示例6
public function store()
{
    request()->validate([
        'file' => 'required',
        'type' => 'required'
    ],
    [
        'file.required' => 'You have to choose the file!',
        'type.required' => 'You have to choose type of the file!'
    ]);
}