Validating Regular Expression

Hi guys, any idea on how am i going to improve my RegularExpressionValidator because I used this expression ^\d{1,2}\/\d{1,2}\/\d{4}$ and it accepts 99/99/9999, whereas the format for my birth date entry is mm/dd/yyyy.

Regular expression validation probably is not the best answer here. Use the DateTime object’s parsing methods in conjunction with a custom validator.

Cheers,
D.

You should use a Compare Validator instead, with the [URL=“http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.comparevalidator.operator.aspx”]Operator Property Set to ‘DataTypeCheck’ and the [URL=“http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.basecomparevalidator.type.aspx”]Type Property Set to ‘Date’