10-Apr-2023
.
Admin
Hi Guys,
In this example,I will learn you to give password and password_confirmation validation in laravel 7/6.you can simply use to validation in laravel 7/6.
we want to match password and confirm password using this validation. you will check password and password_confirmation then use below solution.
Solution :-
/**
* The attributes that are mass assignable.
*
* @var array
*/
public function store(Request $request)
{
$input = $request->all();
$validator = $request->validate([
'email' => 'email',
'vat_number' => 'max:13',
'password' => 'required|confirmed|min:6',
]);
// Write Logic
}
It will help you....
#Laravel 7
#Laravel
#Laravel 6