laravel表单验证问题 在线等 大神求教

public function postadd(Request $request)
{
    $rows = $request->input();
    $area = $request->input('area');
    $name = $request->input('name');
    $contact = $request->input('contact');
    $tels = $request->input('tels');
    $adds = $request->input('adds');
    $lat = $request->input('lat');
    $password = md5($request->input('password'));
    $repassword = md5($request->input('repassword'));

        // $this->validate($request, 
        //     [
        //     'password' => $password,
        //     'repassword' => $repassword,
        //     ],
        //     [
        //     'password' => 'required|unique|size:10',
        //     'repassword' => 'required|unique|size:10',
        //     ]);

    $vpas = Validator::make($request->all(),[
            'password' => $password,
            'repassword' => $repassword,
            ],
            [
            'password' => 'required|unique|size:10',
            'repassword' => 'required|unique|size:10',
            ]);

    if($vpas->passes()){
        return '1';
    }else{

        return '0';
    }
    // echo "<pre>";
    // print_r($rows);
    // echo "</pre>";
    // echo $area.','.$name.','.$contact.','.$tels.','.$adds.','.$lat.','.$password.','.$repassword;
}
这是我的代码

BadMethodCallException in Validator.php line 2676:
Method [validate01affa3293cdaf9b6ba407f239ebecf0] does not exist.

运行后报这个错
已邀请:

要回复问题请先登录注册