Skip to content

Commit

Permalink
Make it possible to override required value that was set in the wrapper.
Browse files Browse the repository at this point in the history
  • Loading branch information
nashby committed May 3, 2015
1 parent 709f3e5 commit 5b92b40
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/simple_form/components/html5.rb
Expand Up @@ -7,10 +7,10 @@ def initialize(*)

def html5(wrapper_options = nil)
@html5 = true
if has_required?
input_html_options[:required] = true
input_html_options[:'aria-required'] = true
end

input_html_options[:required] = has_required?
input_html_options[:'aria-required'] = has_required? || nil

nil
end

Expand Down

0 comments on commit 5b92b40

Please sign in to comment.