app/views/shared/_personal_key_input.html.erb
<%#
locals:
* form: SimpleForm form builder
%>
<%= render ValidatedFieldComponent.new(
form: form,
name: :personal_key,
error_messages: {
patternMismatch: t('users.personal_key.confirmation_error'),
},
label: t('forms.personal_key.confirmation_label'),
required: true,
input_html: {
autocomplete: 'off',
spellcheck: 'false',
class: 'personal-key text-uppercase',
maxlength: PersonalKeyFormatter.code_length,
pattern: PersonalKeyFormatter.regexp_string,
},
) %>
<%= javascript_packs_tag_once('formatted-fields') %>