I have next group of controls:
.control-group.string.required.user_name
= f.input_field :name, required: true, class: 'form-control'
= f.label 'User Name'
= f.error :name
Is there any way to bind '.control-group' to it's child input, so if input is invalid, wrapper will get class ".error" added?
Thanks