Answers for "how to change the password confirmation does not match. in laravel"

PHP
3

laravel password confirmation

// password field like this
<input type="password" name="password"/>
  // matching field like this
//{field}_confirmation
  <input type="password" name="password_confirmation"/>
  //validation rule
  'password' => 'required|min:6|max:25|confirmed',
Posted by: Guest on October-17-2021
0

how to make validate error when password doesnt match with password confirm laravel

// ...

$input = Input::all();

$rules = [
    'password' => 'required|min:8',
    'password_confirmation' => 'required|min:8|same:password',
];

$messages = [
    'password_confirmation.same' => 'Password Confirmation should match the Password',
];
$validator = Validator::make($input, $rules, $messages);

if ($validator->fails()) {
    return back()->withInput()->withErrors($validator->messages());
}
// ...
Posted by: Guest on October-19-2021

Code answers related to "how to change the password confirmation does not match. in laravel"

Browse Popular Code Answers by Language