<commit_before>class User < ActiveRecord::Base
	validates :username, uniqueness: true
	validates_format_of :username, :with => /\A[A-Za-z\d_]+\z/,
		message: "can only contain alpha-numeric characters and underscores with no spaces.",
		allow_blank: true

  validates :email, presence: true, uniqueness: true
  validates_format_of :email, with: /@/,
  	message: "is not in a valid format"
  
  validates :phone, uniqueness: true
  validates_format_of :phone, with: /\A(?:(?:\+?1\s*(?:[.-]\s*)?)?(?:\(\s*([2-9]1[02-9]|[2-9][02-8]1|[2-9][02-8][02-9])\s*\)|([2-9]1[02-9]|[2-9][02-8]1|[2-9][02-8][02-9]))\s*(?:[.-]\s*)?)?([2-9]1[02-9]|[2-9][02-9]1|[2-9][02-9]{2})\s*(?:[.-]\s*)?([0-9]{4})(?:\s*(?:#|x\.?|ext\.?|extension)\s*(\d+))?\z/,
  	message: "is not a valid phone number",
  	allow_blank: true

  validates :password, length: { within: 6..20 },
  	allow_blank: true	
  
  has_many :picks
  has_secure_password
end<commit_msg>allow blanks for username and phone uniqueness validations<commit_after>class User < ActiveRecord::Base
	validates :username, uniqueness: true, allow_blank: true
	validates_format_of :username, :with => /\A[A-Za-z\d_]+\z/,
		message: "can only contain alpha-numeric characters and underscores with no spaces.",
		allow_blank: true

  validates :email, presence: true, uniqueness: true
  validates_format_of :email, with: /@/,
  	message: "is not in a valid format"
  
  validates :phone, uniqueness: true, allow_blank: true
  validates_format_of :phone, with: /\A(?:(?:\+?1\s*(?:[.-]\s*)?)?(?:\(\s*([2-9]1[02-9]|[2-9][02-8]1|[2-9][02-8][02-9])\s*\)|([2-9]1[02-9]|[2-9][02-8]1|[2-9][02-8][02-9]))\s*(?:[.-]\s*)?)?([2-9]1[02-9]|[2-9][02-9]1|[2-9][02-9]{2})\s*(?:[.-]\s*)?([0-9]{4})(?:\s*(?:#|x\.?|ext\.?|extension)\s*(\d+))?\z/,
  	message: "is not a valid phone number",
  	allow_blank: true

  validates :password, length: { within: 6..20 },
  	allow_blank: true	
  
  has_many :picks
  has_secure_password
end
{'fraction_non_alphanumeric': 0.25709860609189467, 'fraction_numerical': 0.06711409395973154, 'mean_word_length': 4.3535911602209945, 'pattern_counts': {'":': 0, '<': 5, '<?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': '3991789', 'n_tokens_mistral': 875, 'n_tokens_neox': 823, 'n_words': 146}