/**
  * Add error class to wrapper if validation errors exist
  *
  * @param $options
  */
 protected function addErrorClass(&$options)
 {
     $errors = $this->formHelper->getRequest()->getSession()->get('errors');
     if ($errors && $errors->has($this->name)) {
         $errorClass = $this->formHelper->getConfig('defaults.wrapper_error_class');
         if ($options['wrapper'] && !str_contains($options['wrapper']['class'], $errorClass)) {
             $options['wrapper']['class'] .= ' ' . $errorClass;
         }
     }
     return $options;
 }
 /**
  * Get current request
  *
  * @return \Illuminate\Http\Request
  */
 public function getRequest()
 {
     return $this->formHelper->getRequest();
 }