ex" + 911234567890"的数据注释在csharp [英] Data Annotation for ex "+911234567890" in csharp

查看:73
本文介绍了ex" + 911234567890"的数据注释在csharp的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨...

现在请告诉我如何为数字创建数据注释仅以(+)符号和数字开头,如下所示,



Ex:+ 911234567890



谢谢。

MSK

解决方案

试试一个正则表达式:

 ^ \ + \d {1,12} 


将找到任何加号,后跟1到12位数字。



获取快餐 [ ^ ] - 它是免费的,它会检查并生成正则表达式。


电话号码的ASP .net验证 [ ^ ]

Hi...
Please let me now how to create Data Annotation for numbers start with only (+) symbol and numbers only as below,

Ex: "+911234567890"

Thanks.
MSK

解决方案

Try a regex:

^\+\d{1,12}


Will find anything which is a plus followed by between 1 and 12 digits only.

Get a copy of Expresso[^] - it's free, and it examines and generates Regular expressions.


ASP .net validation of phone number[^]


这篇关于ex" + 911234567890"的数据注释在csharp的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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