Sha256: d1b666187ae3a1e264060794016fb6968d99332410998120c71a106e9699f5aa
Contents?: true
Size: 612 Bytes
Versions: 6
Compression:
Stored size: 612 Bytes
Contents
module SimpleForm module Components module HTML5 def initialize(*) @html5 = false end def html5 @html5 = true if has_required? input_html_options[:required] = true input_html_options[:'aria-required'] = true end 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
6 entries across 6 versions & 1 rubygems