module Spree
  class User < ActiveRecord::Base
    self.table_name = 'spree_people'

    authenticates_with_sorcery!
  end
end

module Spree
  class User < ActiveRecord::Base
    self.table_name = 'spree_people'

    authenticates_with_sorcery!

    validates :password, length: { minimum: 6 }, if: -> { new_record? || changes[:crypted_password] }
    validates :password, confirmation: true, if: -> { new_record? || changes[:crypted_password] }
    validates :password_confirmation, presence: true, if: -> { new_record? || changes[:crypted_password] }

    validates :email, uniqueness: true
  end
end

Add email and password validations in Spree::User model
Add email and password validations in Spree::User model
