original_string: public function validation($data, $files) {
          $errors = parent::validation($data, $files);
          if ($this->instance->duedate && $data['extensionduedate']) {
              if ($this->instance->duedate > $data['extensionduedate']) {
                  $errors['extensionduedate'] = get_string('extensionnotafterduedate', 'assign');
              }
          }
          if ($this->instance->allowsubmissionsfromdate && $data['extensionduedate']) {
              if ($this->instance->allowsubmissionsfromdate > $data['extensionduedate']) {
                  $errors['extensionduedate'] = get_string('extensionnotafterfromdate', 'assign');
              }
          }
  
          return $errors;
      }
code: public function validation($data, $files) {
          $errors = parent::validation($data, $files);
          if ($this->instance->duedate && $data['extensionduedate']) {
              if ($this->instance->duedate > $data['extensionduedate']) {
                  $errors['extensionduedate'] = get_string('extensionnotafterduedate', 'assign');
              }
          }
          if ($this->instance->allowsubmissionsfromdate && $data['extensionduedate']) {
              if ($this->instance->allowsubmissionsfromdate > $data['extensionduedate']) {
                  $errors['extensionduedate'] = get_string('extensionnotafterfromdate', 'assign');
              }
          }
  
          return $errors;
      }
code_tokens: public function validation ( $ data , $ files ) { $ errors = parent :: validation ( $ data , $ files ) ; if ( $ this -> instance -> duedate && $ data [ 'extensionduedate' ] ) { if ( $ this -> instance -> duedate > $ data [ 'extensionduedate' ] ) { $ errors [ 'extensionduedate' ] = get_string ( 'extensionnotafterduedate' , 'assign' ) ; } } if ( $ this -> instance -> allowsubmissionsfromdate && $ data [ 'extensionduedate' ] ) { if ( $ this -> instance -> allowsubmissionsfromdate > $ data [ 'extensionduedate' ] ) { $ errors [ 'extensionduedate' ] = get_string ( 'extensionnotafterfromdate' , 'assign' ) ; } } return $ errors ; }
docstring: Perform validation on the extension form
  @param array $data
  @param array $files
docstring_tokens: Perform validation on the extension form