why can not find a user with that e-mail address?

前端 未结 4 759
耶瑟儿~
耶瑟儿~ 2021-01-27 09:46
public function create(Request $request) { 
    $this->validate($request, [ \'email\' => \'required|email\', ]);
    $user          


        
4条回答
  •  滥情空心
    2021-01-27 10:38

    simply use the exists method of validation

    public function create(Request $request) { 
    
           $validatedData = $request->validate([
                'email' => 'required|email|exists:user,email',
           ]);
    
    }
    

提交回复
热议问题