Priya M

Priya M

  • NA
  • 42
  • 11.5k

regular expresion validator

Mar 23 2016 3:21 AM
hi
 
I use Regular Exp as follw for Date dd/mm/yyyy format,but it take the invalid date as 29/02/2015,
31/02/2016 or 31/04/2015 like that..please give me correct expression for valid date
 
<asp:RegularExpressionValidator ID="RegCardIssueDate" runat="server"
ErrorMessage="Please Enter date in dd/mm/yyyy format." ForeColor="Red" ControlToValidate="txtCardIssueDate"
ValidationGroup="Validategroup"
ValidationExpression="(0[1-9]|[12][0-9]|3[01])/(0[1-9]|1[012])/\d{4}"></asp:RegularExpressionValidator>
 
 

Answers (4)