473,386 Members | 1,721 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

validation expression

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

ValidationExpression="(^\d{1,2}/|-\d{1,2}/|-\d{4}$ )"
Jan 29 '07 #1
2 1583
"Jon Paal" <Jon[ nospam ]Paal @ everywhere dot comwrote in message
news:e5**************@TK2MSFTNGP03.phx.gbl...
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...?
Jan 29 '07 #2
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.)

--
Milosz
"Mark Rae" wrote:
"Jon Paal" <Jon[ nospam ]Paal @ everywhere dot comwrote in message
news:e5**************@TK2MSFTNGP03.phx.gbl...
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...?
Jan 29 '07 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Geoff Soper | last post by:
I've been looking for a simple way of checking that a string is an e-mail address. I don't need to check if the address exists, just if the format of the string matches. There seem to be lots of...
3
by: arc | last post by:
I have a server object that performs zipcode validation based on zipcode entered in the web form. Ideally this should work as follows: Once the zip code is entered in the edit box it should...
18
by: Steve | last post by:
Hi I have a really weird problem and any assistance would be welcome. I have developed an app in Access 2002. The app runs perfectly on the development machine. I have packaged the app using...
6
by: Chuck | last post by:
A97. A database has a table: tblA which has a single text field, B. It is a primary field, indexed and no duplicates. It is used as a lookup for table tblC. A form based on tblA is used to add...
5
by: JIM.H. | last post by:
Hello, I have this validation expression: ^(?:(?:0?|1)|(?:0?|11)(?!\/31)|(?:0?2)(?:(?!\/3|\/29\/(?:(?:0||)00|(?:\d{2}(?:0||))))))\/(?:0?||3)\/\d{4}$ This is supposed to match MM/DD/YYYY it is...
2
by: ticars | last post by:
I have a telephone number user control in which I need to validate the data entered (Required field validation and regular expression validation). The phone number is represented as 3 text boxes...
2
by: Jeff | last post by:
hey asp.net 2.0 I have a textbox on my webpage. I want to validate that the user has entered a number and not text. So I added a RegularExpressionValidator to the form, and set its...
5
by: paul_zaoldyeck | last post by:
does anyone know how to validate an xml file against multiple defined schema? can you show me some examples? i'm making here an xml reader.. thank you
2
by: pintu | last post by:
Hi I am writing a validation expression for the followings 1)EPF/chp15_v3.htm#p33 or 2)EPF/chp15_v3.htm I wrote the validation expression as *\.(htm|html)\#*$
2
by: jack | last post by:
Im a new bee in validation Im just in the design phase of the project and not thinking about having a saperate validaion block. Just browsed through validaion block of enterprise library which...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.