title: HTML5 validation doesn't work in symfony twig
body: <p>I need to take an ID number consisting 9 digits and a letter at the end. My regex looks quiet fine but the validation doesn't happen as expected.</p>
  
  <p>My input tag looks like follows. </p>
  
  <p>I'm using symfony twigs</p>
  
  <pre class="lang-html prettyprint-override"><code>&lt;input type="text" 
      id="register_idNumber" 
      placeholder="NIC Number" 
      onkeypress="isInputNumber(event)" 
      pattern="^[0-9]{9}[a-zA-Z]$" 
      value="{{ form.idNumber.vars.value }}" 
      name="register[idNumber]" 
      required="required" 
      class="form-control" 
      oninvalid="this.setCustomValidity('Not a valid ID number! ')"
  /&gt;
  &lt;div class="input-group-append"&gt;
  </code></pre>