Link to home
Start Free TrialLog in
Avatar of Angela4eva
Angela4eva

asked on

Asp.net validation C# Date and decimal

I need help to do validation i need to make sure that user has entered correct value in text in decimal format x.xx  if empty ignore and there is another textbox which i want to make sure that user has entered a valid date if empty ignore
ASKER CERTIFIED SOLUTION
Avatar of HainKurt
HainKurt
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Kumaraswamy R
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
I'd also suggest using the ASP.NET Regular Expression validator:
http://msdn.microsoft.com/en-us/library/ms998267.aspx

Currency regular expression: ^\d+(\.\d\d)?$
Date regular expression: (0[1-9]|1[012])[- /.](0[1-9]|[12][0-9]|3[01])[- /.](19|20)\d\d