Closed Thread Icon

Topic awaiting preservation: Date form validation Pages that link to <a href="https://ozoneasylum.com/backlink?for=7991" title="Pages that link to Topic awaiting preservation: Date form validation" rel="nofollow" >Topic awaiting preservation: Date form validation\

 
Author Thread
butcher
Paranoid (IV) Inmate

From: New Jersey, USA
Insane since: Oct 2000

posted posted 12-20-2001 01:37

I need a form validation script using a regex that will make sure the date is entered like this:

MM.DD.YYYY

I could do it in PHP but I know it's better to do it client side. The only problem is that I suck at JavaScript.

I'm sorry to just ask you guys to do this without trying it myself first, but I've kinda got my hands full right now. I tried to modify some of the scripts I found on the web, but I couldn't seem to get them exactly the way I wanted them.

Thanks to all and forgive me!!!!

-Butcher-



[This message has been edited by butcher (edited 12-20-2001).]

mr.maX
Maniac (V) Mad Scientist

From: Belgrade, Serbia
Insane since: Sep 2000

posted posted 12-20-2001 06:55

<SCRIPT TYPE="text/javascript" LANGUAGE="JavaScript">
<!-- ;

// Written by mr.maX, http://www.maxworld.co.yu/

function checkTime(time) {
&nbsp;&nbsp;&nbsp;&nbsp;var timeRE = /^([\d]{2}\.[\d]{2}\.[\d]{4})$/
&nbsp;&nbsp;&nbsp;&nbsp;return timeRE.test(time)
}

// -->
</SCRIPT>


butcher
Paranoid (IV) Inmate

From: New Jersey, USA
Insane since: Oct 2000

posted posted 12-20-2001 12:30

Is there a way to setup a keyboard short cut so I can just push one key that will type out the words:

Thanks mr.maX!

Those words seem to account for at least half of everything I type here at the Asylum.

-Butcher-

« BackwardsOnwards »

Show Forum Drop Down Menu