<commit_before>class User < ActiveRecord::Base
  has_secure_password

  has_many :questions
  has_many :answers
  has_many :comments
  has_many :votes

end<commit_msg>add user validations<commit_after>class User < ActiveRecord::Base
  has_secure_password

  has_many :questions
  has_many :answers
  has_many :comments
  has_many :votes

  validates :username, :email, uniqueness: true, presence: true
  validates :password_digest, presence: true
  validates :password, length: { minimum: 6 }
end
{'fraction_non_alphanumeric': 0.07258064516129033, 'fraction_numerical': 0.0020161290322580645, 'mean_word_length': 5.454545454545454, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, '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': '1023491', 'n_tokens_mistral': 166, 'n_tokens_neox': 155, 'n_words': 43}