<commit_before>class User < ActiveRecord::Base

  serialize :fluent_languages, Array
  serialize :time_preference, Array

  validates :first_name, presence: true
  validates :last_name, presence: true
  validates :email, presence: true, 
                   uniqueness: true, 
                   on: :create
  validates :sid, presence: true, uniqueness: true, on: :create,
                  format: { with: /\A[0-9]+\z/, message: "only allows numbers"},
                  length: { is: 8, message: "must be 8 characters"}
                  
  validate :hours_per_week, presence: true, format: { with: /\A[0-9]+\z/, message: "only allows numbers"}
  validates :academic_title, presence: true
  validates :major, presence: true
  validates :residency, presence: true
  validates :gender, presence: true
  validate :gender_preference, presence: true
  validates :fluent_languages, presence: true
  validates :first_lang_preference, presence: true
  validates :first_lang_proficiency, presence: true
  validates :second_lang_preference, presence: true
  validates :second_lang_proficiency, presence: true<commit_msg>validate hours_per_week form field<commit_after>class User < ActiveRecord::Base

  serialize :fluent_languages, Array
  serialize :time_preference, Array

  validates :first_name, presence: true
  validates :last_name, presence: true
  validates :email, presence: true, 
                   uniqueness: true, 
                   on: :create
  validates :sid, presence: true, uniqueness: true, on: :create,
                  format: { with: /\A[0-9]+\z/, message: "only allows numbers"},
                  length: { is: 8, message: "must be 8 characters"}
                  
  validates :hours_per_week, presence: true, format: { with: /\A[0-9]+\z/, message: "only allows numbers"}
  validates :academic_title, presence: true
  validates :major, presence: true
  validates :residency, presence: true
  validates :gender, presence: true
  validate :gender_preference, presence: true
  validates :fluent_languages, presence: true
  validates :first_lang_preference, presence: true
  validates :first_lang_proficiency, presence: true
  validates :second_lang_preference, presence: true
  validates :second_lang_proficiency, presence: true
{'fraction_non_alphanumeric': 0.0962566844919786, 'fraction_numerical': 0.0053475935828877, 'mean_word_length': 3.5816326530612246, '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': '2531401', 'n_tokens_mistral': 673, 'n_tokens_neox': 638, 'n_words': 200}