call (DataMapper::Validate::UniquenessValidator)

    # File lib/dm-validations/validators/uniqueness_validator.rb, line 18
          def call(target)
            value = target.send(field_name)

            return true if @options[:allow_nil] && value.blank?

            opts = {
              :fields    => target.model.key,
              field_name => value,
            }

            Array(@options[:scope]).each { |subject| opts[subject] = target.send(subject) }

            resource = DataMapper.repository(target.repository.name) { target.model.first(opts) }

            return true if resource.nil?
            return true if target.saved? && resource.key == target.key

            error_message = @options[:message] || ValidationErrors.default_error_message(:taken, field_name)
            add_error(target, error_message, field_name)

            false
          end