views:

7

answers:

0

I used a CompareValidator like so:

<asp:CompareValidator ID="cvtxtDOB" runat="server" Operator="DataTypeCheck" ControlToValidate="txtDOB" ErrorMessage="Invalid date format" Text="*" ValidationGroup="GeneralValidations" Type="Date"></asp:CompareValidator>

If I enter a date using this format 31/01/10 (for 31 January 2010), Firefox throws an error and the page does not validate. It also disregards ValidationGroups on the page.

How best can I ensure a user enters a a valid Date? Cross browser off course :-)