简体   繁体   English

Codeigniter中的电话号码验证

[英]Phone Number Validation in Codeigniter

I have validated my form in such a way that it ain't submitting the data unless the contact field has something else without 11 numeric values. 我已经以不提交数据的方式验证了我的表单,除非联系人字段中包含没有11个数字值的其他内容。 But now I need such phone number validation in Codeigniter that the input field doesn't even let me to type a single character if that is not a number. 但是现在我需要在Codeigniter中进行电话号码验证,以使输入字段甚至不能输入单个字符(如果不是数字)。 Can anyone help me with that? 有人可以帮我吗?

What you're looking for is jquery plugin which restricts user input to digits only. 您正在寻找的是jquery插件,该插件将用户输入限制为仅数字。

This is plugin - http://www.texotela.co.uk/code/jquery/numeric/ 这是插件-http: //www.texotela.co.uk/code/jquery/numeric/

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM