title: Remove validation error message from Rails view
body: <p>Fairly simple question here. </p>
  
  <p>I put a validation in my icon model <code>validates_presence_of :icon</code>. </p>
  
  <p>When I try to upload an empty icon, a red message "can't be blank" automatically shows up in my view. </p>
  
  <p>The problem is that I am outputting these messages on my own using the standard block:</p>
  
  <pre><code>&lt;% if @icon.errors.any? %&gt;
    &lt;% @icon.errors.full_messages.each do |msg| %&gt;
      &lt;%= msg %&gt;&lt;/li&gt;
    &lt;% end %&gt;
  &lt;% end %&gt;
  </code></pre>
  
  <p>I don't want both of the error messages to show up. How do I eliminate the automatically generated error message?</p>
  
  <p>EDIT: Here is my new.html.erb file where the message is being rendered. </p>
  
  <pre><code>&lt;h1&gt;New Icon&lt;/h1&gt;
  &lt;%= form_for @icon do |f| %&gt;
    &lt;% if @icon.errors.any? %&gt;
      &lt;% @icon.errors.full_messages.each do |msg| %&gt;
        &lt;%= msg %&gt;
      &lt;% end %&gt;
    &lt;% end %&gt;
    &lt;%= f.label :icon %&gt;
    &lt;%= f.file_field :icon %&gt;
    &lt;%= f.submit%&gt;
  &lt;% end %&gt;
  </code></pre>
  
  <p>There is only one <code>msg</code> being printed, but the view is showing the message printed twice.</p>