Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion app/components/validated_field_component.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
describedby: aria_describedby_idrefs,
},
},
hint_html: { id: hint_id, class: hint_class },
hint_html: { id: hint_id },
error_html: { id: error_id },
),
) %>
Expand Down
7 changes: 1 addition & 6 deletions app/components/validated_field_component.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,10 @@ class ValidatedFieldComponent < BaseComponent

alias_method :f, :form

def initialize(form:, name:, error_messages: {}, hint_class: nil, **tag_options)
def initialize(form:, name:, error_messages: {}, **tag_options)
@form = form
@name = name
@error_messages = error_messages
@hint_class = hint_class
@tag_options = tag_options
@input_type = inferred_input_type
end
Expand Down Expand Up @@ -43,10 +42,6 @@ def hint_id
"validated-field-hint-#{unique_id}"
end

def hint_class
@hint_class || []
end

private

def value_missing_error_message
Expand Down
8 changes: 4 additions & 4 deletions app/views/idv/address/new.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
name: :address1,
label: t('idv.form.address1'),
hint: @presenter.address_line1_hint,
hint_class: @presenter.hint_class,
hint_html: { class: @presenter.hint_class },
required: true,
maxlength: 255,
input_html: { value: @presenter.pii['address1'] },
Expand All @@ -42,7 +42,7 @@
name: :address2,
label: t('idv.form.address2'),
hint: @presenter.address_line2_hint,
hint_class: @presenter.hint_class,
hint_html: { class: @presenter.hint_class },
required: false,
maxlength: 255,
input_html: { value: @presenter.pii['address2'] },
Expand All @@ -52,7 +52,7 @@
name: :city,
label: t('idv.form.city'),
hint: @presenter.city_hint,
hint_class: @presenter.hint_class,
hint_html: { class: @presenter.hint_class },
required: true,
maxlength: 255,
input_html: { value: @presenter.pii['city'] },
Expand All @@ -73,7 +73,7 @@
as: :tel,
label: t('idv.form.zipcode'),
hint: @presenter.zipcode_hint,
hint_class: @presenter.hint_class,
hint_html: { class: @presenter.hint_class },
required: true,
pattern: '(\d{5}([\-]\d{4})?)',
input_html: { value: @presenter.pii['zipcode'], class: 'zipcode' },
Expand Down