def validate(object, context = Attributor::DEFAULT_ROOT_CONTEXT)
      raise "INVALID CONTEXT!! #{context}" unless context
      # Validate any requirements, absolute or conditional, and return.

      if object.nil? # == Attributor::UNSET
        # With no value, we can only validate whether that is acceptable or not and return.
        # Beyond that, no further validation should be done.
        return validate_missing_value(context)
      end

      # TODO: support validation for other types of conditional dependencies based on values of other attributes

      errors = validate_type(object, context)

      # End validation if we don't even have the proper type to begin with
      return errors if errors.any?

      if options[:values] && !options[:values].include?(object)
        errors << "Attribute #{Attributor.humanize_context(context)}: #{Attributor.errorize_value(object)} is not within the allowed values=#{options[:values].inspect} "
      end

      errors + type.validate(object, context, self)
    end
def validate(object, context = Attributor::DEFAULT_ROOT_CONTEXT)
      raise "INVALID CONTEXT!! #{context}" unless context
      # Validate any requirements, absolute or conditional, and return.

      if object.nil? # == Attributor::UNSET
        # With no value, we can only validate whether that is acceptable or not and return.
        # Beyond that, no further validation should be done.
        return validate_missing_value(context)
      end

      # TODO: support validation for other types of conditional dependencies based on values of other attributes

      errors = validate_type(object, context)

      # End validation if we don't even have the proper type to begin with
      return errors if errors.any?

      if options[:values] && !options[:values].include?(object)
        errors << "Attribute #{Attributor.humanize_context(context)}: #{Attributor.errorize_value(object)} is not within the allowed values=#{options[:values].inspect} "
      end

      errors + type.validate(object, context, self)
    end
Validates stuff and checks dependencies