<commit_before>module DanvanthiriCore
  module CustomValidation
    extend ActiveSupport::Concern

    included do
      validate :integer
    end

    def special_chars
      self.class.columns.each do |column|
        value = self.send(column.name)
        if !value.blank? && column.type.to_s=="integer" && value > 2147483647
          errors.add column.name.to_sym, "integer value out of range"
        end
      end
    end
  end
end<commit_msg>fix custom validation<commit_after>module DanvanthiriCore
  module CustomValidation
    extend ActiveSupport::Concern

    included do
      validate :integer_field
    end

    def integer_field
      self.class.columns.each do |column|
        value = self.send(column.name)
        if !value.blank? && column.type.to_s=="integer" && value > 2147483647
          errors.add column.name.to_sym, "integer value out of range"
        end
      end
    end
  end
end
{'fraction_non_alphanumeric': 0.0787746170678337, 'fraction_numerical': 0.02188183807439825, 'mean_word_length': 2.5603112840466924, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4325304', 'n_tokens_mistral': 287, 'n_tokens_neox': 268, 'n_words': 71}