日期的正则表达式验证器 [英] Regular Expression Validator for date
本文介绍了日期的正则表达式验证器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我需要使用Regular Expression Validator在我的文本框中验证日期。 TextBox应仅允许此格式 YYYY-MM-DD 。
任何人都可以告诉我....
I need to validate date using Regular Expression Validator to my text box. TextBox should allow this format only YYYY-MM-DD.
could any body tell me....
推荐答案
在你的验证表达式中试试这个表达式< br $>
^ \d {4} - ((0 \d)|(1 [012])) - (([012] \d)| 3 [01])
try this expression in your validation expression
^\d{4}-((0\d)|(1[012]))-(([012]\d)|3[01])
:)
:)
这篇关于日期的正则表达式验证器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文