# File lib/html5/filters/validator.rb, line 322
  def validate_start_tag_input(token)
    check_attribute_values(token) do |t|
      yield t
    end
    attr_dict = Hash[*token[:data].collect{|(name, value)| [name.downcase, value]}.flatten]
    input_type = attr_dict.fetch('type', "text")
    if !@@input_type_allowed_attribute_map.keys().include?(input_type)
      yield({:type => "ParseError",
           :data => "unknown-input-type",
           :datavars => {:attrValue => input_type}})
    end
    allowed_attributes = @@input_type_allowed_attribute_map.fetch(input_type, [])
    attr_dict.each do |attr_name, attr_value|
      if !@@allowed_attribute_map['input'].include?(attr_name)
        yield({:type => "ParseError",
             :data => "unknown-attribute",
             :datavars => {"tagName" => "input",
                  "attributeName" => attr_name}})
      elsif !allowed_attributes.include?(attr_name)
        yield({:type => "ParseError",
             :data => "attribute-not-allowed-on-this-input-type",
             :datavars => {"attributeName" => attr_name,
                  "inputType" => input_type}})
      end
      if @@input_type_deprecated_attribute_map.fetch(input_type, []).include?(attr_name)
        yield({:type => "ParseError",
             :data => "deprecated-attribute",
             :datavars => {"attributeName" => attr_name,
                  "inputType" => input_type}})
      end
    end
  end