%= form_with(model: vendor, local: true) do |form| %>
<% if vendor.errors.any? %>
<%= pluralize(vendor.errors.count, "error") %> prohibited this vendor from being saved:
<% vendor.errors.full_messages.each do |message| %>
- <%= message %>
<% end %>
<% 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 :dba, 'DBA' %>
<%= form.text_field :dba %>
<%= form.label :tin, 'TIN' %>
<%= form.text_field :tin, maxlength: 9 %>
<%= form.label :contact %>
<%= form.text_field :contact %>
<%= form.submit %>
<% end %>
<%# This is to correct phone number entry %>
<%# This is for auto resizing the address field %>