# File lib/dm-constraints/delete_constraint.rb, line 25
        def check_delete_constraint_type(cardinality, name, *args)
          options = extract_options(args)

          return unless options.key?(:constraint)

          constraint = options[:constraint]

          unless CONSTRAINT_OPTIONS.include?(constraint)
            raise ArgumentError, ":constraint option must be one of #{CONSTRAINT_OPTIONS.to_a.join(', ')}"
          end

          # XXX: is any constraint valid with a :through relationship?
          if constraint == :set_nil && options.key?(:through)
            raise ArgumentError, 'Constraint type :set_nil is not valid for relationships using :through'
          end
        end