Html Bootstrap 3 电话号码验证
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/20325117/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Bootstrap 3 phone number validation
提问by Tomarz
Does anybody know if it's possible to validate a phone number (just to check if the value is an integer) in bootstrap v3?
有人知道是否可以在 bootstrap v3 中验证电话号码(只是为了检查该值是否为整数)?
回答by chris
It′s not a bootstrap thing. Take a look at this one:
这不是一个引导程序。看看这个:
<input type="number" name="quantity" min="1" max="5">
<input type="tel" name="usrtel">
回答by urfusion
just use class for bootstrap. check the example below.
只需使用类进行引导。检查下面的例子。
<input type="text" id="UserMobile" maxlength="14" data-fv-numeric="true" data-fv-numeric-message="Please enter valid phone numbers" data-fv-phone-country11="IN" required="required" data-fv-notempty-message="This field cannot be left blank." placeholder="Mobile No. " class="form-control" name="data[User][mobile]" data-fv-field="data[User][mobile]">
回答by Scott D. Strader
There are some basic validation format and requirement checks, using HTML+CSS, described at the MDN article for <input type="tel">.
有一些基本的验证格式和需求检查,使用 HTML+CSS,在 MDN 文章中对 < input type="tel"> 进行了描述。
回答by luidgi27
回答by Arunraj S
Please check this link for form validation. it will give you a complete form validation solution http://formvalidator.net/#default-validators_email
请检查此链接以进行表单验证。它将为您提供完整的表单验证解决方案http://formvalidator.net/#default-validators_email