Move uniqueness validation to ActiveRecord module