[ "required", function($attribute, $value, $fail) { if(!Hash::check($value, auth()->user()->password)) { $fail("Current password is invalid."); } } ], "password" => "required|string|confirmed|min:8|regex:/^(?=.*?[A-Z])(?=.*?[a-z])(?=.*?[0-9])(?=.*?[#?!@$%^&*-]).{8,}$/", ]; } }