title: Ignore play framework form errors at different views
body: <p>i'd like to know whether I could ignore play standard validation when I want to. For instance, let's imagine I have a Entity called Car just like</p>
  
  <pre><code>@Entity
  public class Car{
  
     @Id
     private Long id;
  
     @Required
     private String model;
  
     @Required
     private String hiddenField; //important but doesn't appear in some cases (some usecases)
  
  }
  </code></pre>
  
  <p>In order to make it clearer, then</p>
  
  <p>Case 1</p>
  
  <pre><code>@(carForm : Form[Car])
  @import helper._
  
  @form(routes.controller.foo.bar) {
      @inputText(carForm("model"))
      &lt;input type="submit"&gt;
  }
  </code></pre>
  
  <p>Case 2</p>
  
  <pre><code>@(carForm : Form[Car])
  @import helper._
  
  @form(routes.controller.foo.bar) {
      @inputText(carForm("model"))
      @inputText(carForm("hiddenField"))
      &lt;input type="submit"&gt;
  }
  </code></pre>
  
  <p>Then I have a Play.data.Form object, and it has errors cause i haven't filled model or the hiddenField that was given as exmple. But, actually, i have some situations that this hidden doesn't even appear (case 1), i mean, there's no input called that, as the user is not allowed to edit it that time. So, if I have two usecases, where at the first, all inputs are there and they are supposed to be filled, but the other one has no 'hiddenField' input, but, altought, it's still required by my model, and, of course, a form submitted without it has error as well, what should I do?. How was I supposed to deal with it? I have one model, but validation may be different in one case to another, and i wanna it to be server side, not jquery nor pure javascript.</p>
  
  <p>I tried to discardErrors through 
  (Imagine it was submitted from case 1)</p>
  
  <pre><code>MyForm&lt;Car&gt; myCarForm = Form.form(Car.class).bindFromRequest();
  //it has errors, sure it does, hiddenField was required and that field didn't even exist at screen.
  myCarForm.discardErrors(); //ok, error hashmap is empty right now
  myCarForm.get(); // anyway, no value here.
  //myCarForm.data(); //for sure i could retrieve field by field and remount object that way, but that looks hacky and hardworking
  </code></pre>
  
  <p>Then, any solution? Thank u all</p>