📌  相关文章
📜  laravel 验证器制作自定义消息 - PHP 代码示例

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

代码示例4
$rules = [
        'name' => 'required',
        'email' => 'required|email',
        'message' => 'required|max:250',
    ];

    $customMessages = [
        'required' => 'The :attribute field is required.'
    ];

    $this->validate($request, $rules, $customMessages);
//@sujay