Use phone validator to restrict the input URLs.
<input type="text" ng:validate="url"/>
angular.validator.url(value)
value – {string} –
value to validate
Enter valid phone number: <input name="text" value="http://example.com/abc.html" size="40" ng:validate="url" >
it('should invalidate url', function(){ var n1 = element('.doc-example-live :input'); expect(n1.attr('className')).not().toMatch(/ng-validation-error/); input('text').enter('abc://server/path'); expect(n1.attr('className')).toMatch(/ng-validation-error/); });