Regular expression for asp:RegularExpressionValidator with format MMddyy (leap year issue)

后端 未结 4 1190
误落风尘
误落风尘 2020-11-27 07:46

We need help for regular expression that work with asp.net asp:RegularExpressionValidator to validate date in MMddyy format. Problem we are facing is leap year. Issue is tha

4条回答
  •  感动是毒
    2020-11-27 08:48

    If server side is not an option, you'll have to use JavaScript. Try the code posted and explained here. It determines that 02/29/2010 is invalid and 02/29/2008 is valid. Use a CustomValidator to call the JavaScript function when necessary.

提交回复
热议问题