Check below RegEx for validate brithdate into asp.net
<asp:RegularExpressionValidator ID="RegExpVal1" runat="server" ControlToValidate="{Here Goes your Text Box}" ErrorMessage="DOB has to be in dd/mm/yyyy format" ValidationExpression="^([1-9]0[1-9][12][0-9]3[01])[- /.]([1-9]0[1-9]1[012])[- /.][0-9]{4}$" >*</asp:RegularExpressionValidator>
let me know if you have any problem
Thanks,
Gaurav Dhol
Skype ID : dhol.gaurav
If My Post contains helped you, Please Mark as Answer
Marked as answer by ibocus on Sep 20, 2012 06:23 AM
ibocus
Member
23 Points
77 Posts
check valid birth date
Sep 20, 2012 06:11 AM|LINK
how to validate control to check for a valid user's birth date?
im new to asp.net, please help
dhol.gaurav
Contributor
3998 Points
725 Posts
Re: check valid birth date
Sep 20, 2012 06:17 AM|LINK
Hello,
Check below RegEx for validate brithdate into asp.net
<asp:RegularExpressionValidator ID="RegExpVal1" runat="server" ControlToValidate="{Here Goes your Text Box}" ErrorMessage="DOB has to be in dd/mm/yyyy format" ValidationExpression="^([1-9]0[1-9][12][0-9]3[01])[- /.]([1-9]0[1-9]1[012])[- /.][0-9]{4}$" >*</asp:RegularExpressionValidator>let me know if you have any problem
Gaurav Dhol
Skype ID : dhol.gaurav
If My Post contains helped you, Please Mark as Answer
matifnadeem
Contributor
4580 Points
1090 Posts
Re: check valid birth date
Sep 20, 2012 06:19 AM|LINK
Hi,
Use following links
http://www.networking.mydesigntool.com/viewtopic.php?tid=338&id=31
and use below post
http://forums.asp.net/t/1241154.aspx/1/10
M Atif Nadeem
Mark as Answer if you got right thing
Read my blog | Follow me on LinkedIn