...

View Full Version : validate DDMMYYYY



crmpicco
07-01-2005, 09:38 AM
{
if( !/^(\d{1,2})\/(\d{1,2})\/(\d{4})$/.test(obj.value) ) {
alert( "Invalid date supplied - must be format DD/MM/YYYY" );
obj.focus();
return;
}


how do i change this to validate DDMMYYYY? (no slashes?)

martin_narg
07-01-2005, 04:22 PM
if( !/^(\d{1,2})(\d{1,2})(\d{4})$/.test(obj.value) ) {
alert( "Invalid date supplied - must be format DD/MM/YYYY" );
obj.focus();
return;
}



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum