Sha256: 2cef78d171908bda162e5e328679349f1efa8011f4a8f2c14513f409da42b1e4

Contents?: true

Size: 970 Bytes

Versions: 1

Compression:

Stored size: 970 Bytes

Contents

module Yaks
  # Based on the HTML living standard over at WHATWG
  # https://html.spec.whatwg.org/multipage/forms.html
  #
  # Does not aim to be complete, does aim to be a strict subset.
  module HTML5Forms

    INPUT_TYPES = [
      :checkbox,
      :color,
      :date,
      :datetime,
      :datetime_local, # :datetime-local in the spec
      :email,
      :file,
      :hidden,
      :image,
      :month,
      :number,
      :password,
      :radio,
      :range,
      :reset,
      :search,
      :tel,
      :text,
      :time,
      :url,
      :week,

      :select,
      :textarea,
      :datalist
    ]

    FIELD_OPTIONS = {
      required: false,
      rows: nil,
      type: nil,
      value: nil,
      pattern: nil,
      maxlength: nil,
      minlength: 0,
      size: 20,
      readonly: false,
      multiple: false,
      min: nil,
      max: nil,
      step: nil,
      list: nil,
      placeholder: nil,
      checked: false
    }

  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
yaks-0.7.7 lib/yaks/html5_forms.rb