original_string: protected function validate_idnumber($value) {
          global $DB;
          $sql = 'idnumber = :idnumber AND competencyframeworkid = :competencyframeworkid AND id <> :id';
          $params = array(
              'id' => $this->get('id'),
              'idnumber' => $value,
              'competencyframeworkid' => $this->get('competencyframeworkid')
          );
          if ($DB->record_exists_select(self::TABLE, $sql, $params)) {
              return new lang_string('idnumbertaken', 'error');
          }
          return true;
      }
code: protected function validate_idnumber($value) {
          global $DB;
          $sql = 'idnumber = :idnumber AND competencyframeworkid = :competencyframeworkid AND id <> :id';
          $params = array(
              'id' => $this->get('id'),
              'idnumber' => $value,
              'competencyframeworkid' => $this->get('competencyframeworkid')
          );
          if ($DB->record_exists_select(self::TABLE, $sql, $params)) {
              return new lang_string('idnumbertaken', 'error');
          }
          return true;
      }
code_tokens: protected function validate_idnumber ( $ value ) { global $ DB ; $ sql = 'idnumber = :idnumber AND competencyframeworkid = :competencyframeworkid AND id <> :id' ; $ params = array ( 'id' => $ this -> get ( 'id' ) , 'idnumber' => $ value , 'competencyframeworkid' => $ this -> get ( 'competencyframeworkid' ) ) ; if ( $ DB -> record_exists_select ( self :: TABLE , $ sql , $ params ) ) { return new lang_string ( 'idnumbertaken' , 'error' ) ; } return true ; }
docstring: Validate the ID number.
  
  @param string $value The ID number.
  @return true|lang_string
docstring_tokens: Validate the ID number .