@H_404_0@<span style="background-color: #ccffcc">
代码如下所示:
<div class="jb51code">
<pre class="brush:xhtml;">
<form ng-app="myApp" ng-controller="validateCtrl"
name="myForm" novalidate>
@H_404_0@电话:
<input type="text" name="phone" ng-model="phone" ng-pattern="/(^$)|^(((+86)|(86))?1[34578]\d{9})$/">
<span style="color:red" ng-show="myForm.phone.$dirty && myForm.phone.$invalid">
联系电话格式不正确!
@H_404_0@
<input type="submit"
ng-disabled="myForm.$invalid">