📌  相关文章
📜  laravel 自定义存在规则 - TypeScript 代码示例

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

代码示例2
$messsages = array(
        'email.required'=>'You cant leave Email field empty',
        'name.required'=>'You cant leave name field empty',
                'name.min'=>'The field has to be :min chars long',
    );

    $rules = array(
        'email'=>'required|unique:content',
        'name'=>'required|min:3',
    );

    $validator = Validator::make(Input::all(), $rules,$messsages);