<commit_before>class User < ActiveRecord::Base
	has_many :images, :as => :imageable
	
	has_many :recipes
	has_many :comments
	has_many :stories
	
	has_many :group_users
	has_many :groups, through: :group_users

	has_secure_password
	validates :email, presence: true
end
<commit_msg>add user email validations and format<commit_after>class User < ActiveRecord::Base
	has_many :images, :as => :imageable
	
	has_many :recipes
	has_many :comments
	has_many :stories
	
	has_many :group_users
	has_many :groups, through: :group_users

	has_secure_password
	validates :email, presence: true, 
						uniqueness: true,
            format: { :with => /\w+@\w+\.\w+/}
	validates :username, presence: true,
             uniqueness: true
end

{'fraction_non_alphanumeric': 0.09739368998628258, 'fraction_numerical': 0.0, 'mean_word_length': 4.251798561151079, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 6, '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': '4694486', 'n_tokens_mistral': 260, 'n_tokens_neox': 243, 'n_words': 66}