Files

Class/Module Index [+]

Quicksearch

SimpleForm::Components::HTML5

Public Class Methods

new(*) click to toggle source
# File lib/simple_form/components/html5.rb, line 4
def initialize(*)
  @html5 = false
end

Public Instance Methods

has_required?() click to toggle source
# File lib/simple_form/components/html5.rb, line 18
def has_required?
  # We need to check browser_validations because
  # some browsers are still checking required even
  # if novalidate was given.
  required_field? && SimpleForm.browser_validations
end
html5() click to toggle source
# File lib/simple_form/components/html5.rb, line 8
def html5
  @html5 = true
  input_html_options[:required] = true if has_required?
  nil
end
html5?() click to toggle source
# File lib/simple_form/components/html5.rb, line 14
def html5?
  @html5
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.