diff --git a/app/components/dsfr/input_errorable.rb b/app/components/dsfr/input_errorable.rb index 182bfb84b..9442ceb1c 100644 --- a/app/components/dsfr/input_errorable.rb +++ b/app/components/dsfr/input_errorable.rb @@ -11,12 +11,14 @@ module Dsfr def dsfr_group_classname if dsfr_champ_container == :fieldset 'fr-fieldset' - else + elsif dsfr_input_classname.present? # non fillable element "#{dsfr_input_classname}-group" end end def input_group_error_class_names + return {} if dsfr_group_classname.nil? + { "#{dsfr_group_classname}--error" => errors_on_attribute?, "#{dsfr_group_classname}--valid" => !errors_on_attribute? && errors_on_another_attribute?