6

I am trying to using confirm password validation. I applied correct rules. But when it validates then it give me validation error like below: The password confirmation does not match. Controller

public function register(Request $req){
        $this->validate($req,[
           'Password'         =>   'required|confirmed|min:3'
          ]);

    }
Ahsan Asif
  • 123
  • 3
  • 9

1 Answers1

12

what is your password confirmation field name because |confirmed| always work with laravel naming conversions For example, if the field under validation is password, a matching password_confirmation field must be present in the input.

is that your input name is password_confirmation ?? if not do that else comment me more code please so i can help you..

M.Idrish
  • 389
  • 3
  • 9
  • 1
    Thank you. solved. but kindly clear me that i used same name but the difference was that i used capital P and C like Password_Confirmation. Was this the problem? – Ahsan Asif Mar 26 '20 at 09:08