联系表格7电话号码验证 [英] Contact form 7 telephone number verification
问题描述
我试图使用内置的验证方法来查看联系表单7以验证电话号码。
联系表单7标记:
< p> [number * your-telephone min:1000000000 max:9999999999占位符电话号码]< / p> ;
< p> [submitsubmit]< / p>
因此,我在这里要做的是使用输入的最小和最大属性限制电话号码数字的类型。但这里的问题是,如果我输入一个电话号码:0402356584那么它小于最小值,但仍然是一个电话号码。
那么,我怎么能设置最小值和最大值以支持所有可能的10位电话号码?
与我的方法不同的其他解决方案也是最受欢迎的。因为我感觉无法使用min和max属性进行验证。
我也尝试通过functions.php文件编辑插件文件来自源代码但没有成功。
因此,如果任何人有完美的解决方案来验证联系表格7上的电话号码,那么请张贴您的答案。 b $ b
<$ p $ [number * your-telephone minlength:10 maxlength:140 placeholder'Telephone number]]
I am trying to use the built in verification method for contact form 7 to verify a telephone number.
Contact form 7 markup:
<p>[number* your-telephone min:1000000000 max:9999999999 placeholder "Telephone number"] </p>
<p>[submit "submit"]</p>
So, what I am trying to do here is restrict phone number using the min and max properties of input type of number. But the problem here is that if I enter a telephone number say: 0402356584 then it is less than the min value but is still a phone number.
So, how can I set the min and max value to support all possible 10 digit telephone numbers?
Any other solution different from my approach is also most welcome. Because I have got a feeling that the verification can not be done using min and max attributes.
I also tried to edit the plugin files via functions.php file by using the code from a source but that did not work.
So, if any one has the perfect solution to validate telephone numbers on contact form 7 then please post your answers.
Try this one definitely it will work as per contact form 7 documentation.
[number* your-telephone minlength:10 maxlength:140 placeholder "Telephone number"]
这篇关于联系表格7电话号码验证的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!