title: Numbers which was given in textarea should be greater than 0 and less than 5
body: <p>I have tried using below code for which the textarea accepts numbers greater than 0 and less than 5, everything is working fine but when comes to decimal it unable to validate. below is my code</p>
  
  <pre><code> &lt;body ng-controller="MainCtrl"&gt;
    &lt;form name="myform"&gt;
    &lt;input type="number" min="0" name="minmax" ng-model="number" required="required" maxlength="10" numbers-only/&gt;
   &lt;span ng-show="myform.$error.numbersOnly"&gt;Enter the numbers only between 0 to 5 &lt;/span&gt;
   &lt;/form&gt;
   &lt;/body&gt;
  </code></pre>
  
  <p>and here is controller</p>
  
  <pre><code> var app = angular.module('plunker', []);
   app.directive('numbersOnly', function(){
     return {
       require: 'ngModel',
       link: function(scope, element, attrs, modelCtrl) {
         modelCtrl.$parsers.push(function (inputValue) {
  
  
         if(parseInt(inputValue) &lt;= 5  &amp;&amp; parseInt(inputValue) &gt; 0){
           modelCtrl.$setValidity('numbersOnly', true);
           return inputValue;
         } else {
           modelCtrl.$setValidity('numbersOnly', false);
            return modelCtrl.$modelValue;
         }
  
      });
     }
   };
  }); 
  
  function MyCtrl($scope) {
  $scope.number = ''
   }
  </code></pre>
  
  <p>and here is my working plunker <a href="http://plnkr.co/edit/rOShiJYCZrXcgMdr951i?p=preview" rel="nofollow noreferrer">http://plnkr.co/edit/rOShiJYCZrXcgMdr951i?p=preview</a></p>