original_string: public function validation($data, $files) {
          $errors = [];
          if (isset($data['purgeselectedcaches']) && empty(array_filter($data['purgeselectedoptions']))) {
              $errors['purgeselectedoptions'] = get_string('purgecachesnoneselected', 'admin');
          }
          return $errors;
      }
code: public function validation($data, $files) {
          $errors = [];
          if (isset($data['purgeselectedcaches']) && empty(array_filter($data['purgeselectedoptions']))) {
              $errors['purgeselectedoptions'] = get_string('purgecachesnoneselected', 'admin');
          }
          return $errors;
      }
code_tokens: public function validation ( $ data , $ files ) { $ errors = [ ] ; if ( isset ( $ data [ 'purgeselectedcaches' ] ) && empty ( array_filter ( $ data [ 'purgeselectedoptions' ] ) ) ) { $ errors [ 'purgeselectedoptions' ] = get_string ( 'purgecachesnoneselected' , 'admin' ) ; } return $ errors ; }
docstring: If the "Purge selected caches" button was pressed, ensure at least one cache was selected.
  
  @param array $data
  @param array $files
  @return array Error messages
docstring_tokens: If the Purge selected caches button was pressed ensure at least one cache was selected .