validation expression

  • Thread starter Thread starter Jon Paal
  • Start date Start date
J

Jon Paal

this validationexpression fails for "mm/dd/yyyy" what is correct pattern ?

ValidationExpression="(^\d{1,2}/|-\d{1,2}/|-\d{4}$ )"
 
this validationexpression fails for "mm/dd/yyyy" what is correct pattern ?

ValidationExpression="(^\d{1,2}/|-\d{1,2}/|-\d{4}$ )"

You can't validate dates this way - this would allow e.g. 99/99/0000

Are you trying to do this in client-side JavaScript...?
 
Hi,

In addition to Mark's reply you have to consider every aspect of the date
validation, lexical and logical validation (number of days in a certain
month, leap years etc.)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Validator 3
ValidationExpression Error 3
regularExpressionValidator and dateTime 4
Regular Expression 1
problem with validation 1
Password Validation 1
RegExp Again! 8
ASP.NET 1.1 Bug - Dynamic RE Validator 1

Back
Top