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

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

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

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

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