code: private function fakeRequiredIfData($data, $rule, $parameters)
      {
          if ($rule !== 'RequiredIf') {
              return;
          }
  
          $newData = $data;
          $newData[$parameters[0]] = $parameters[1];
          $this->validator->setData($newData);
      }
docs: Generate fake data to get RequiredIf message.
  
  @param $data
  @param $rule
  @param $parameters
  @return void