Laravel Password & Password_Confirmation Validation

前端 未结 7 1535
甜味超标
甜味超标 2020-12-23 17:16

I\'ve been using this in order to edit the User Account Info:

$this->validate($request, [
    \'password\' => \'min:6\',
    \'password_confirmation\'          


        
相关标签:
7条回答
  • 2020-12-23 18:13

    I have used in this way. Its Working fine!

    $rules = [
    
                'password' => [
    
                        'required',
    
                        'string',
    
                        'min:6',
    
                    'max:12',             // must be at least 8 characters in length
    
                    ],
    
                'confirm_password' => 'required|same:password|min:6'
    
            ];
    
    0 讨论(0)
提交回复
热议问题