title: Regular Expression to match pattern like 2:1 in angular js
body: <p>I need to validate textfield and user should only enter pattern like 2:1 i.e. number1 colon number2 where number1 should be greater than number 2 .
  I am using Angular js in project: When I select Buy x get y free then Input field should accept above pattern.</p>
  
  <pre><code>&lt;select class="form-control" id="offerType" ng-model="addOffer.discount"&gt;
              &lt;option value="Buy x get y free"&gt;Buy x get y free&lt;/option&gt;
              &lt;option value="Basket level offer - 100$ for 5"&gt;Basket level offer - 100$ for 5&lt;/option&gt;
              &lt;option value="Basket level offer - Product free"&gt;Basket level offer - Product free&lt;/option&gt;
              &lt;option value="Discount %"&gt;Discount %&lt;/option&gt;
              &lt;option value="Discount $"&gt;Discount $&lt;/option&gt;
  &lt;/select&gt;    
  
  &lt;input type="text" required class="form-control" id="" placeholder="Enter Discount Value" ng-model="addOffer.value"&gt;
  </code></pre>