%= form_with(model: worker, local: true, html: { class: 'needs-validation', novalidate: true }) do |form| %>
<% if worker.errors.any? %>
<%= pluralize(worker.errors.count, "error") %> prohibited this worker from being saved:
<% worker.errors.full_messages.each do |message| %>
- <%= message %>
<% end %>
<% end %>
<%= form.label :name, class: 'form-label' %>
<%= form.text_field :name, class: 'form-control' %>
<%= form.label :address, class: 'form-label' %>
<%= form.text_area :address, rows: 1, class: 'form-control auto-expand' %>
<%= form.label :phone, class: 'form-label' %>
<%= form.telephone_field :phone, id: 'phone-field', class: 'form-control', placeholder: '(XXX)-XX-XXXX' %>
<%= form.label :email, class: 'form-label' %>
<%= form.email_field :email, id: 'email-field', class: 'form-control', required: true, placeholder: 'Make sure to include @ sign' %>
<%= form.label :dob, 'DOB', class: 'form-label' %>
<%= form.date_field :dob, class: 'form-control' %>
<%= form.label :ssn, 'Social Security Number', class: 'form-label' %>
<%= form.text_field :ssn, id: 'ssn-field', class: 'form-control', maxlength: 11, placeholder: 'XXX-XX-XXXX' %>
<%= form.label :gender, class: 'form-label' %>
<%= form.select :gender, ['Unknown', 'Female', 'Male', 'Non-Binary', 'Other'], {}, class: 'form-select' %>
<%= form.submit class: 'btn btn-primary' %>
<% 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 %>