<commit_before>class AppConfig < ActiveRecord::Base

  attr_accessible :site_title, :admin_email, :department_name, :contact_link_location,
                  :home_link_text, :home_link_location,
                  :upcoming_checkin_email_body, :upcoming_checkin_email_active,
                  :overdue_checkin_email_body, :overdue_checkin_email_active,
                  :reservation_confirmation_email_active,
                  :delete_missed_reservations, :send_notifications_for_deleted_missed_reservations,
                  :deleted_missed_reservation_email_body,
                  :default_per_cat_page, :terms_of_service, :favicon,
                  :checkout_persons_can_edit, :override_on_create,
                  :override_at_checkout, :require_phone

  has_attached_file :favicon, url: "/system/:attachment/:id/:style/favicon.:extension"

  validates_with AttachmentContentTypeValidator, attributes: :favicon, content_type: 'image/vnd.microsoft.icon',
                                      message: "Must be .ico"


  validates :site_title, 	presence: true,
							length: {maximum: 20 }
  validates :admin_email,
							format: { with: /^([\w\.%\+\-]+)@([\w\-]+\.)+([\w]{2,})$/i }
  validates :default_per_cat_page, numericality: { only_integer: true }

end<commit_msg>changed regex to use /A and /z instead of ^ or $<commit_after>class AppConfig < ActiveRecord::Base

  attr_accessible :site_title, :admin_email, :department_name, :contact_link_location,
                  :home_link_text, :home_link_location,
                  :upcoming_checkin_email_body, :upcoming_checkin_email_active,
                  :overdue_checkin_email_body, :overdue_checkin_email_active,
                  :reservation_confirmation_email_active,
                  :delete_missed_reservations, :send_notifications_for_deleted_missed_reservations,
                  :deleted_missed_reservation_email_body,
                  :default_per_cat_page, :terms_of_service, :favicon,
                  :checkout_persons_can_edit, :override_on_create,
                  :override_at_checkout, :require_phone

  has_attached_file :favicon, url: "/system/:attachment/:id/:style/favicon.:extension"

  validates_with AttachmentContentTypeValidator, attributes: :favicon, content_type: 'image/vnd.microsoft.icon',
                                      message: "Must be .ico"


  validates :site_title,   presence: true,
              length: {maximum: 20 }
  validates :admin_email,
              format: { with: /\A([\w\.%\+\-]+)@([\w\-]+\.)+([\w]{2,})\z/i }
  validates :default_per_cat_page, numericality: { only_integer: true }

end

{'fraction_non_alphanumeric': 0.10385643375334097, 'fraction_numerical': 0.002290950744558992, 'mean_word_length': 2.91044776119403, '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': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7452477', 'n_tokens_mistral': 861, 'n_tokens_neox': 796, 'n_words': 123}