<commit_before><%= widget_div(data: { hook: 'opco-new-credit-card' }) do %>
  <%= form_for credit_card_form, url: url_for_event(:create_credit_card), remote: true do |f| %>
    <%= f.hidden_field :user_id, value: user.id %>

    <%= f.label :number, t(:card_number) %>
    <%= f.text_field :number %>

    <%= label_tag :month, 'Expiration Month' %>
    <%= select_month(Date.today,
                     { use_month_numbers: true, field_name: :month, prefix: :credit_card },
                     { id: 'month' }
                    ) %>

    <%= label_tag :year, 'Expiration Year' %>
    <%= select_year(Date.today,
                    { start_year: Date.today.year, end_year: Date.today.advance(years: 15).year, prefix: :credit_card, field_name: :year },
                    { id: 'year'}
                   ) %>

    <%= f.label :verification_value, t(:verification_value) %>
    <%= f.text_field :verification_value %>

    <%= f.button 'Save' %>
  <% end  %>
<% end %><commit_msg>Adds inline form-validation messages to the credit-card form<commit_after><%= widget_div(data: { hook: 'opco-new-credit-card' }) do %>
  <%= semantic_form_for credit_card_form, url: url_for_event(:create_credit_card), remote: true do |f| %>
    <%= f.inputs do %>
      <%= f.input :user_id, as: :hidden, input_html: { value: user.id } %>
      <%= f.input :number, label: t(:card_number) %>

      <%= f.input :month, as: :select, label: t(:expiration_month),
            include_blank: false, collection: 1..12 %>
      <%= f.input :year, as: :select, label: t(:expiration_year),
            include_blank: false, collection: (Date.today.year..(Date.today.advance(years: 15).year)) %>

      <%= f.input :verification_value, label: t(:verification_value) %>
    <%- end %>

    <%= f.actions do %>
      <%= f.action :submit, label: 'Save' %>
    <% end %>
  <% end  %>
<% end %>
{'fraction_non_alphanumeric': 0.18230563002680966, 'fraction_numerical': 0.0037533512064343165, 'mean_word_length': 2.792682926829268, 'pattern_counts': {'":': 0, '<': 31, '<?xml version=': 0, '>': 31, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1466768', 'n_tokens_mistral': 714, 'n_tokens_neox': 624, 'n_words': 128}