original_string: public function validation($data, $files) {
          $errors = parent::validation($data, $files);
          if (count($errors) === 0 && !isset($data['sharing'])) {
              // They must select at least one sharing option.
              $errors['sharing'] = get_string('sharingrequired', 'cache');
          }
          return $errors;
      }
code: public function validation($data, $files) {
          $errors = parent::validation($data, $files);
          if (count($errors) === 0 && !isset($data['sharing'])) {
              // They must select at least one sharing option.
              $errors['sharing'] = get_string('sharingrequired', 'cache');
          }
          return $errors;
      }
code_tokens: public function validation ( $ data , $ files ) { $ errors = parent :: validation ( $ data , $ files ) ; if ( count ( $ errors ) === 0 && ! isset ( $ data [ 'sharing' ] ) ) { // They must select at least one sharing option. $ errors [ 'sharing' ] = get_string ( 'sharingrequired' , 'cache' ) ; } return $ errors ; }
docstring: Validates this form
  
  @param array $data
  @param array $files
  @return array
docstring_tokens: Validates this form