title: URL validation. ng-pattern not working
body: <p><div class="snippet" data-lang="js" data-hide="false" data-console="false" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>$scope.regex = '^((http|https|ftp):\/\/)?([a-z]+\.)?[a-z0-9-]+(\.[a-z]{1,4}){1,2}(/.*\?.*)?$';
  
  This is the regular expression i'm using to validate url, and its working fine. I have checked it on AngularJS website.</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;div class="field_input"&gt;
    &lt;div style="width: 100%;"&gt;
      &lt;input type="text" name="website" ng-model="custom.websites" placeholder="www.daiict.ac.in" ng-minlength=3 ng-pattern="regex" required/&gt;
    &lt;/div&gt;
  &lt;/div&gt;
  &lt;div class="valid-chk" ng-show="requestForm1.website.$dirty" style="margin-top: 5px;"&gt;
    &lt;i style="font-size: 1.15em;padding:0px;" ng-class="{'false':'icon-close', 'true': 'icon-correct'}[requestForm1.website.$valid]" class="icon-correct"&gt;&lt;/i&gt;
  &lt;/div&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>This is html snippet where the i'm trying to validate the input field.
  However this is not working. Also when I used ng-pattern all other validations on input field, except required, are also not working. Any idea why...</p>