<p dir="auto"><strong>Steps to reproduce and a minimal demo of the problem</strong></p>
<p dir="auto"><a href="http://plnkr.co/edit/IAMpyeJl9rQlAcEFPoRs?p=preview" rel="nofollow">http://plnkr.co/edit/IAMpyeJl9rQlAcEFPoRs?p=preview</a></p>
<p dir="auto"><em>What steps should we try in your demo to see the problem?</em></p>
<ol dir="auto">
<li>put some input longer than 2 characters in the first input</li>
<li>try to put some input longer than 2 characters in the second input</li>
</ol>
<p dir="auto"><strong>Current behavior</strong></p>
<p dir="auto">HTML5 specifies a number of validation attributes for form elements that browsers are able to interpret to various effects.  These are useful for things like restricting input length (maxLength) and for doing DOM queries (e.g. find all required input elements).</p>
<p dir="auto">Currently, Angular2 applies validation for a number of these attributes if they are applied in the form template.  However, when forms are built using FormBuilder, validation is defined in the ControlMeta object and not as attributes on the form elements.  ngControl does not apply these validations as attributes to the host element, so when FormBuilder is used, either these attributes will not get defined and therefore the browser's HTML5 validation behavior will not be in effect or validation constraints must be duplicated in the form templates and ControlMeta.</p>
<p dir="auto"><strong>Expected/desired behavior</strong></p>
<p dir="auto">I think it would be useful to have the ngControl directive manage HTML5 validation attributes on the host form element based on the validators applied to the Control object.</p>
<p dir="auto"><strong>Other information</strong></p>
<p dir="auto"><code class="notranslate">npm install</code> is failing on a change done on May 1st is causing all fresh/clean checkouts to fail</p>
<p dir="auto">Reproduced by</p>
<p dir="auto">First Bad (you can also use master(as of <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/angular/angular/commit/9f784dcc5a524000836c5e4cd7b3384e21963637/hovercard" href="https://github.com/angular/angular/commit/9f784dcc5a524000836c5e4cd7b3384e21963637"><tt>9f784dc</tt></a>)) check in that appeared in history (note you will never see this error if you already have build from a previous version)</p>
<pre class="notranslate">rm -rf node_modules;
git checkout a66cdb469f56f8ebab2e5f2e44d59b53effd0489;
npm install</pre>
<p dir="auto">it stops with the message </p><pre class="notranslate">&lt; angular-srcs@2.0.0-beta.17 preinstall angular<br>
&lt; node tools/npm/check-node-modules<p dir="auto"></p>
<p dir="auto">:-( npm dependencies are stale or in an in unknown state!<br>
</p></pre><p dir="auto"></p>
<p dir="auto">Last Good npm install</p>
<pre class="notranslate">rm -rf node_modules
git checkout 4fe0f1fa655717fd49045dedaebc8b1100f11238
npm install</pre>
<p dir="auto">produces at the same lines</p>
<pre class="notranslate">&lt; angular-srcs@2.0.0-beta.17 preinstall angular
&lt; node tools/analytics/build-analytics start install npm3-install &amp;&amp; node tools/analytics/build-analytics start install npm-preinstall &amp;&amp; node tools/npm/check-node-modules &amp;&amp; node tools/analytics/build-analytics success install npm-preinstall &amp;&amp; node tools/analytics/build-analytics start install npm-install-net

:-( npm dependencies are stale or in an in unknown state!
</pre>
<p dir="auto">(so tools/analytics/build-analytics is never fired) which makes sense as someone was working with repackaging and must of buggered it up</p>
<p dir="auto"><a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/angular/angular/commit/a66cdb469f56f8ebab2e5f2e44d59b53effd0489/hovercard" href="https://github.com/angular/angular/commit/a66cdb469f56f8ebab2e5f2e44d59b53effd0489"><tt>a66cdb4</tt></a>: "repackaging: all the repackaging changes squashed"</p>