<%= form_with(model: [:admin, @doctor], local: true) do |f| %>
  <%= render 'shared/error_messages', object: @doctor %>
  <p>
    <%= f.label :name %><br />
    <%= f.text_field :name %>
  </p>
  <p>
    <%= f.label :email %><br />
    <%= f.text_field :email %>
  </p>
  <p><%= f.submit 'Submit' %></p>
<% end %>

<%= form_with(model: [:admin, @doctor], local: true) do |f| %>
  <%= render 'shared/error_messages', object: @doctor %>
  <p>
    <%= f.label :name %><br />
    <%= f.text_field :name %>
  </p>
  <p>
    <%= f.label :email %><br />
    <%= f.email_field :email %>
  </p>
  <p><%= f.submit 'Submit' %></p>
<% end %>

Use appropriate field type for email
Use appropriate field type for email
