title: Angular2 setting min and max value of input field
body: <p>I'm new to Angular2. I'm trying to restrict user input to numbers between 110 and 5000. I don't want to do just user input validation. I will like to prevent a user from putting different values than numbers between 110 and 5000. I tried to do it max and min but it only works for up and down key strokes.</p>
  
  <p>Here is HTML part:</p>
  
  <pre><code>&lt;div class="form-group"&gt;
      &lt;label for="flowRate"&gt;Flow Rate&lt;/label&gt;&lt;br&gt;
      &lt;div class="input-group calc-addon-group"&gt;
        &lt;input class="form-control addon-input" type="number" step="any" [(ngModel)]="tmpFlowRate" id="flowRate" onfocus="this.select();"&gt;
        &lt;span class="input-group-addon units"&gt;{{settings.flowMeasurement}}&lt;/span&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  </code></pre>