您好,欢迎来到三六零分类信息网!老站,搜索引擎当天收录,欢迎发信息

最新AngularJs 验证手机号码实例分享

2024/3/14 9:37:44发布19次查看
本文主要和大家分享angularjs 最新验证手机号码的实例,并且经过测试angularjs 验证成功测试通过,所以本文具有很好的参考价值,希望能帮助到大家。
实例如下:
<form name="signupform" novalidate> <p class="form-group"> <p class="row clearfix"> <label for="tel1" class="col-xs-12" style="text-align: left">l张蒙号码1:</label> <p style="text-align: center" class="col-xs-12"> <input id="tel1" type="tel" name="tel1" data-ng-model="vm.tel1" ng-minlength="11" ng-pattern="/^1[3|5][0-9]\d{4,8}$/" required style="width: 80%;font-size: large" placeholder="请输入号码1:"/> </p> <p class="col-xs-12"> <p class="glyphicon glyphicon-ok input_result text-success" ng-if="signupform.tel1.$valid"></p> <p class="text-danger glyphicon glyphicon-remove" ng-if="signupform.tel1.$error.required&&signupform.tel1.$touched">电话不能为空!</p> <p class="text-danger glyphicon glyphicon-remove" ng-if="(signupform.tel1.$error.minlength||signupform.tel1.$error.maxlength||signupform.tel1.$error.pattern)&&signupform.tel1.$touched">请输入有效手机号!</p> </p> </p> </form>
怎么样大家学会了吗?大家赶紧尝试一下吧。
相关推荐:
jquery如何用正则表达式验证手机号、身份证号、中文名称
javascript - 正则验证手机号码的问题
验证手机号码的js方法分享_javascript技巧
以上就是最新angularjs 验证手机号码实例分享的详细内容。
该用户其它信息

VIP推荐

免费发布信息,免费发布B2B信息网站平台 - 三六零分类信息网 沪ICP备09012988号-2
企业名录 Product