code: public function validate()
      {
          $this->required('Bucket');
  
          $count_add = count($this->add_all);
          $count_remove = count($this->remove_all);
  
          if ($count_add + $count_remove < 1) {
              throw new Exception('At least one element to add or remove needs to be defined.');
          }
  
          // if we are performing a remove, Location and context are required
          if ($count_remove) {
              $this->required('Location');
              $this->required('Context');
          }
      }
docs: {@inheritdoc}