<%= form_for(@user) do |f| %>
  <div>
    <%= f.label :username %>:
    <%= f.text_field :username %>
  </div>

  <div>
    <%= f.label :email %>:
    <%= f.text_field :email %>
  </div>

  <div>
    <%= f.label :password %>:
    <%= f.password_field :password %>
  </div>

  <div>
    <%= f.submit %>
  </div>
<% end %>

<% @user.errors.each do |error| %>
  <p><%= flash[:error] = @user.errors[error].first %><p>
<% end %>
<%= form_for(@user) do |f| %>
  <div>
    <%= f.label :username %>:
    <%= f.text_field :username %>
  </div>

  <div>
    <%= f.label :email %>:
    <%= f.text_field :email %>
  </div>

  <div>
    <%= f.label :password %>:
    <%= f.password_field :password %>
  </div>

  <div>
    <%= f.submit %>
  </div>
<% end %>

<% @user.errors.each do |error_array, error| %>
  <p><%= flash[:error] = error %><p>
<% end %>
Update flash error validation so it displays every single error
Update flash error validation so it displays every single error
