如何验证长度为10的数字。 [英] How Do I Validate Numbers With Length 10.

查看:60
本文介绍了如何验证长度为10的数字。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我如何验证长度为10的数字。意味着它只接受10个数字

解决方案

还没有用google搜索。我是 google it


使用以下正则表达式验证输入:



 ^ \(?([0-9] {3})\)?[ - 。 ]([0-9] {3})[? - 。 ]([0-9] {4})


how do i validate numbers with length 10. means it will accept only 10 numbers

解决方案

haven't googled yet.let me google it


Use the following regular expression to validate the input :

^\(?([0-9]{3})\)?[-. ]?([0-9]{3})[-. ]?([0-9]{4})



这篇关于如何验证长度为10的数字。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆