0
URLフィールドの値をユーザーが確認する必要があります。Angular JS URL Validation
システムは、誰もが最善の方法を私たちにお勧めでき
FacebookやTwitterは、Google + &などをお願いします。
私たちは、あなたがさらなる検証のためにurl
例
<form name="form1" ng-controller="x">
<label>Enter Site Name:</label>
<input type="url" ng-model="initialwebsite" name="name" required />
<span style="color:red" ng-show="form1.name.$error.required">
You Can't Leave This Field Empty</span>
<span style="color:red" ng-show="form1.name.$error.url">
Sorry Not a Valid URL, Don't Forget to Use http://</span>
<input type="submit" value="Submit"/>
</form>
として入力タイプを使用して起動することができ、
/((?:https?\:\/\/www\.)|(?:[a-z0-9]+([\-\.]{1}[a-z0-9]+)*\.[a-z]{2,5}(:[0-9]{1,5})?(\/.*)?$))/i
おかげで、
何丁度あなたが検証する必要がありますか? – Jax
'(https?:\/\ /(?: www \。|(?!www))[^ \ s \。] + \。[^ \ s] {2、} | www \。[^ \ s ] + \。[^ \ s] {2、}) 'これを試してください –