title: HTML input pattern for an email domain
body: <p>I tried to use the <strong>pattern</strong> attribute of the HTML <strong>input</strong> tag to do a simple client-side validation for a specific email domain using the following code:</p>
  
  <pre><code>&lt;input type="text" pattern="^[A-Z0-9._%+-]+@domain\.com\.ph$" /&gt;
  </code></pre>
  
  <p>I expected the following input to succeed:
  <strong>test.test@domain.com.ph</strong></p>
  
  <p>But somehow it does not seem to work. 
  Am I using an incorrect <strong>regex</strong>?</p>
  
  <p>To eliminate some answers, I have tried checking the following:</p>
  
  <ul>
  <li>browser supports pattern validation</li>
  <li>the pattern <code>^[A-Z0-9._%+-]+@domain.com.ph$</code></li>
  <li>the pattern <code>^[A-Z0-9._%+-]+@domain.com.ph</code></li>
  </ul>