I am looking for a regular expression to validate date format mm/dd/yy (including leap year). Below is a sample code that mask dates in the format MM/DD/YY. This code doesn't validate leap year dates like 02/29/16.
Kindly help me find a solution. Thanks a lot in advance!
<asp:TextBox ID="txtRpt" runat="server" Text='<%# Bind("Rpt", "{0:MM/dd/yy}") %>'></asp:TextBox>
<asp:MaskedEditExtender ID="meTxtRpt" runat="server" TargetControlID="txtRpt" Mask="99/99/99" MaskType="Date"></asp:MaskedEditExtender>
<asp:MaskedEditValidator ID="mevTxtRpt" runat="server" ValidationExpression="^[0-9]{1,2}/[0-9]{1,2}/[0-9]{2}$" ControlExtender="meTxtRpt" ControlToValidate="txtRpt" ValidationGroup="pnll1" InvalidValueMessage="Enter valid date<br /> e.g. mm/dd/yy" Display="None"></asp:MaskedEditValidator>
<asp:ValidatorCalloutExtender ID="vceTxtRpt" runat="server" TargetControlID="mevTxtRpt" Enabled="True"></asp:ValidatorCalloutExtender>