Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Custom Date Format Validation

Reply
Thread Tools

Custom Date Format Validation

 
 
Andy
Guest
Posts: n/a
 
      04-26-2004
I wish to validate the date a user has entered against the format dd
mmm yyyy

Using the CompareValidator and DataTypeCheck does not work and I
suspect that a Regular Expression is over-engineering. Does anybody
have a simple solution please?

Many thanks in advance.
 
Reply With Quote
 
 
 
 
Ashish M Bhonkiya
Guest
Posts: n/a
 
      04-27-2004
Hi Andy,

when you are using the compare validator to compare to dates it uses the
default culture info of your machine. so the simplest solution is to set the
following line in your web.config with culture which has the dateformat " dd
mmm yyyy".

<globalization requestEncoding="utf-8" responseEncoding="utf-8"
culture="en-GB" />

HTH
Regards
Ashish M Bhonkiya

"Andy" <> wrote in message
news: om...
> I wish to validate the date a user has entered against the format dd
> mmm yyyy
>
> Using the CompareValidator and DataTypeCheck does not work and I
> suspect that a Regular Expression is over-engineering. Does anybody
> have a simple solution please?
>
> Many thanks in advance.



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Javascript Date Validation in MM/DD/YYY output format pmarisole Javascript 3 02-16-2006 06:21 PM
Validation and date format paulsmith5@hotmail.com ASP .Net 0 01-16-2006 01:50 PM
Date validation and format help cc900630@ntu.ac.uk Javascript 6 07-12-2005 01:14 PM
Date, date date date.... Peter Grison Java 10 05-30-2004 01:20 PM
Date Format - best way of converting a string into a date format Brian Candy ASP .Net 2 02-18-2004 02:13 PM



Advertisments