Sha256: b5f48203b883d1a06c6ba503a7b494458eadf2d2db0fa42aedccd8a06f16c7bb
Contents?: true
Size: 536 Bytes
Versions: 3
Compression:
Stored size: 536 Bytes
Contents
module SimpleForm module Components module HTML5 def initialize(*) @html5 = false end def html5 @html5 = true input_html_options[:required] = true if has_required? nil end def html5? @html5 end 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 end end end
Version data entries
3 entries across 3 versions & 2 rubygems
Version | Path |
---|---|
simple_form_awesome-2.5.0 | lib/simple_form/components/html5.rb |
simple_form_awesome-2.4.0 | lib/simple_form/components/html5.rb |
simple_form-3.0.0.beta1 | lib/simple_form/components/html5.rb |