Module: SimpleForm::Components::HTML5
- Included in:
- Inputs::Base
- Defined in:
- lib/simple_form/components/html5.rb
Instance Method Summary collapse
Instance Method Details
#has_required? ⇒ Boolean
18 19 20 21 22 23 |
# 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 ⇒ Object
8 9 10 11 12 |
# File 'lib/simple_form/components/html5.rb', line 8 def html5 @html5 = true [:required] = true if has_required? nil end |
#html5? ⇒ Boolean
14 15 16 |
# File 'lib/simple_form/components/html5.rb', line 14 def html5? @html5 end |
#initialize ⇒ Object
4 5 6 |
# File 'lib/simple_form/components/html5.rb', line 4 def initialize(*) @html5 = false end |