asp.net验证控件 [英] asp.net validation control
本文介绍了asp.net验证控件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
你好
i希望在文本框上为日期格式yyyy / mm / dd设置正则表达式验证器。
请回复表达式...
hello
i want to set regular expression validator for date format yyyy/mm/dd on textbox.
please reply expression for that...
推荐答案
^\d{4}[\-\/\s]?((((0[13578])|(1[02]))[\-\/\s]?(([0-2][0-9])|(3[01])))|(((0[469])|(11))[\-\/\s]?(([0-2][0-9])|(30)))|(02[\-\/\s]?[0-2][0-9]))
复制上面的表达式并在表达位置超过它..
Copy the above Expression and in Expression place past it..
这篇关于asp.net验证控件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文