I am trying to validate a password field only if it is present. I want to allow someone to edit a user and they may or may not want to change the users password. So I thought I
In edit mode you fill password field by for example "********" and in update mode validate like this
$this->validate($request, [
'password' => 'required|min:8',
]);
and in controller check $data['password']='********'
find old password and
$data['password']='old password in db'
and $data['password']!='********'
update pssword