<%= form_with(model: worker, local: true) do |form| %> <% if worker.errors.any? %>

<%= pluralize(worker.errors.count, "error") %> prohibited this worker from being saved:

<% end %>
<%= form.label :name %> <%= form.text_field :name %>
<%= form.label :address %> <%= form.text_area :address, rows: 1, class: 'auto-expand' %>
<%= form.label :phone %> <%= form.telephone_field :phone, id: 'phone-field' %>
<%= form.label :email %> <%= form.email_field :email, id: 'email-field', required: true %>
<%= form.label :dob %> <%= form.date_field :dob %>
<%= form.label :ssn, 'Social Security Number' %> <%= form.text_field :ssn, id: 'ssn-field', maxlength: 11, placeholder: 'XXX-XX-XXXX' %>
<%= form.label :gender %> <%= form.select :gender, ['Unknown', 'Female', 'Male', 'Non-Binary', 'Other'] %>
<%= form.submit %>
<% end %> <%# This is to correct phone number entry %> <%# This is for auto resizing the address field %> <%# This is to require 1 @ sign for email entry %> <%# This is for Social Security formatting and # of digits %>