<commit_before>module AjoRegister
  class User < ActiveRecord::Base
    # Include default devise modules. Others available are:
    # :token_authenticatable, :confirmable,
    # :lockable, :timeoutable and :omniauthable
    devise :database_authenticatable, :registerable, :confirmable,
           :recoverable, :rememberable, :trackable
  
    # Setup accessible (or protected) attributes for your model
    attr_accessible :password, :password_confirmation, :remember_me
    attr_accessible :age_of_consent, :city, :email, :first_name, :gender, :last_name, :mailing_address, :opt_in, :province, :rules_and_regulations, :password, :password_confirmation, :date_of_birth

    validates_presence_of :first_name, :message => I18n.t('register.form_errors.first_name.required')
    validates_presence_of :last_name, :message => I18n.t('register.form_errors.last_name.required')
    validates_presence_of :email, :message => I18n.t('register.form_errors.email.required')
    validates_presence_of :gender, :message => I18n.t('register.form_errors.gender.required')
    validates_presence_of :date_of_birth, :message => I18n.t('register.form_errors.date_of_birth.required')
    validates_presence_of :mailing_address, :message => I18n.t('register.form_errors.mailing_address.required')
    validates_presence_of :city, :message => I18n.t('register.form_errors.city.required')
    validates_presence_of :province, :message => I18n.t('register.form_errors.province.required')
    validates_presence_of :password, :password => <PASSWORD>('<PASSWORD>.form_<PASSWORD>')
    validates_presence_of :password_confirmation, :password => <PASSWORD>('register.form_errors.password_confirmation.required')


  end
end
<commit_msg>add email validation<commit_after>module AjoRegister
  class User < ActiveRecord::Base
    # Include default devise modules. Others available are:
    # :token_authenticatable, :confirmable,
    # :lockable, :timeoutable and :omniauthable
    devise :database_authenticatable, :registerable, :confirmable,
           :recoverable, :rememberable, :trackable
  
    # Setup accessible (or protected) attributes for your model
    attr_accessible :password, :password_confirmation, :remember_me
    attr_accessible :age_of_consent, :city, :email, :first_name, :gender, :last_name, :mailing_address, :opt_in, :province, :rules_and_regulations, :password, :password_confirmation, :date_of_birth

    validates_presence_of :first_name, :message => I18n.t('register.form_errors.first_name.required')
    validates_presence_of :last_name, :message => I18n.t('register.form_errors.last_name.required')
    validates_presence_of :email, :message => I18n.t('register.form_errors.email.required')
    validates_uniqueness_of :email, :message => I18n.t('register.form_errors.email.unique')
    validates_format_of :email, :with => Devise.email_regexp, :message => I18n.t('register.form_errors.email.format')
    validates_presence_of :gender, :message => I18n.t('register.form_errors.gender.required')
    validates_presence_of :date_of_birth, :message => I18n.t('register.form_errors.date_of_birth.required')
    validates_presence_of :mailing_address, :message => I18n.t('register.form_errors.mailing_address.required')
    validates_presence_of :city, :message => I18n.t('register.form_errors.city.required')
    validates_presence_of :province, :message => I18n.t('register.form_errors.province.required')
    validates_presence_of :password, :message => I18n.t('register.form_errors.password.required')
    validates_presence_of :password_confirmation, :message => I18n.t('register.form_errors.password_confirmation.required')
  end
end

{'fraction_non_alphanumeric': 0.11562757484207635, 'fraction_numerical': 0.010985992859104642, 'mean_word_length': 6.240556660039761, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 30, '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': '1858464', 'n_tokens_mistral': 1206, 'n_tokens_neox': 1157, 'n_words': 198}