module Spree  
  class Contact < ActiveRecord::Base
    validates :name, presence: true
    validates :email, format: { with: /\A([^@\s]+)@((?:[-a-z0-9]+\.)+[a-z]{2,})\z/i, on: :create }
    validates :message, presence: true
  end
end