1.对URL地址值的格式校验
2.对纯数字做校验
3.使用方式
比如校验http:
<span style="font-size:14px;"><input type="text" class="form-control" valid-http="{{值}}" name="xuexi"/>
<small class="error" ng-show="myForm.xuexi</span><span style="font-size:14px;">.$error.http">
*数据格式不合法(如:http://xxx)
</small></span>
比如校验数字:
<span style="font-size:14px;"><input type="text" class="form-control" valid-http="{{值}}" name="xuexi"/>
<small class="error" ng-show="myForm.xuexi</span><span style="font-size:14px;">.$error.number">
*数据必须为纯数字
</small></span>
(注:以上代码包下载地址:http://download.csdn.net/detail/foreversilent/9567661)