title: HV000030: No validator could be found for constraint 'javax.validation.constraints.Size' validating type 'java.util.Map'
body: <p>I'm using the bean validation feature using hibernate-validator</p>
  
  <p>Validator Logic</p>
  
  <pre><code> public enum ValidatorFactory {
      SINGLE_INSTANCE {
  
    javax.validation.ValidatorFactory avf =   Validation.buildDefaultValidatorFactory();
  
    @Override
    public Validator getValidator() {
       return avf.getValidator();
    }
  
    };
  
    public abstract Validator getValidator();
  }
  </code></pre>
  
  <p>I'm calling validator.validate(obj) on a object which has an optional field like below</p>
  
  <pre><code>@UnwrapValidatedValue
  @Valid
  @Size(min = 1, max = 9)
  private Optional&lt;Map&lt;Integer, AreaType&gt;&gt; field;
  </code></pre>
  
  <p>Error
  javax.validation.UnexpectedTypeException: HV000030: No validator could be found for constraint 'javax.validation.constraints.Size' validating type 'java.util.Map'.</p>