original_string: public function define_validate_specific($data, $files) {
          $errors = array();
  
          // Make sure the start year is not greater than the end year.
          if ($data->param1 > $data->param2) {
              $errors['param1'] = get_string('startyearafterend', 'profilefield_datetime');
          }
  
          return $errors;
      }
code: public function define_validate_specific($data, $files) {
          $errors = array();
  
          // Make sure the start year is not greater than the end year.
          if ($data->param1 > $data->param2) {
              $errors['param1'] = get_string('startyearafterend', 'profilefield_datetime');
          }
  
          return $errors;
      }
code_tokens: public function define_validate_specific ( $ data , $ files ) { $ errors = array ( ) ; // Make sure the start year is not greater than the end year. if ( $ data -> param1 > $ data -> param2 ) { $ errors [ 'param1' ] = get_string ( 'startyearafterend' , 'profilefield_datetime' ) ; } return $ errors ; }
docstring: Validate the data from the profile field form.
  
  @param stdClass $data from the add/edit profile field form
  @param array $files
  @return array associative array of error messages
docstring_tokens: Validate the data from the profile field form .