Jump to content

[SOLVED] If for checking string length is not working.


busillis

Recommended Posts

  if (form.cardnumber.length <16) {
  	document.getElementById("errors").innerHTML += "<p>Invalid card number provided.</p>";
form.cardnumber.focus();
haserror=true;
  }

 

This doesn't seem to be doing anything, but the other validation ones (such as checking its not empty) is.  Any idea?

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.