title: Java constraint validator - how to invoke default constraint validator from my custom validator?
body: <p>I have a model object like the one below with custom constraint validator. The custom validator checks if either fileName or hours is populated.</p>
  
  <pre><code>@ValidCriteria
  class Criteria{
      @NotEmpty String id;    
      @NotEmpty String name;
      String fileName;
      String hours;   
  }
  </code></pre>
  
  <p>There is a method which takes takes this as input and it validates all the following conditions</p>
  
  <ol>
  <li>criteria is not null (by Default validator)</li>
  <li>criteria.id is not empty (by Default validator)</li>
  <li>criteria.name is not empty (by Default validator)</li>
  <li><p>criteria fileName or hours is not empty (by custom validator)</p>
  
  <p>void evaluate(@NotNull @Valid Criteria criteria){}</p></li>
  </ol>
  
  <p>Now when I'm writing unit test for this model class. I'm invoking</p>
  
  <pre><code>Validation.buildDefaultValidatorFactory().getValidator().validate(criteria)
  </code></pre>
  
  <p>when I do this, the first 3 validations by default validator is not being invoked. Is there a way to invoke the default validator from my unit test or from my custom validator?</p>