Logistics Management

  • Post author:
  • Post category:Shipping

9) { checksum = checksum + 1; calc = calc – 10; } checksum = checksum + calc; if (j ==1) {j = 2} else {j = 1}; } if (checksum % 10 != 0) { ccErrorNo = 3; return false; } } if (cardNo == ‘5490997771092064’) { ccErrorNo = 5; return false; } var LengthValid = false; var PrefixValid = false; var undefined; var prefix = new Array (); var lengths = new Array (); prefix = cards[cardType].prefixes.split(“,”); for (i=0; i 29 || (day==29 && !isleap)) {return false;}}return true; }if(matchArray2 == null){}else{year = matchArray2[1]; month = matchArray2[3];day = matchArray2[5];if (month 12) { alert(“Month must be between 1 and 12.”+month);return false;}if (day 31) {return false;}if ((month==4 || month==6 || month==9 || month==11) && day==31) {return false;}if (month == 2) { var isleap = (year % 4 == 0 && (year % 100 != 0 || year % 400 == 0));if (day > 29 || (day==29 && !isleap)) {return false;}}return true; }},$.format(“The value entered must be a Date”)); $.validator.addMethod(“pastdate”,function(v,e,o){if(v===”){return true;}var dBefore = new Date();dBefore = new Date(dBefore.toDateString());var dValue = new Date(v);var ok = !/Invalid|NaN/.test(dValue);if(o.before){dBefore = new Date(o.before);}if (ok){ok=dBefore>dValue}return ok;} ,$.format(“The date entered must be in the past.”)); $.validator.addMethod(“notregex”,function(v,e,p){if(v===”){return true};return !v.match(p);},$.format(“The value entered does not match the specified pattern ({0})”)); $.validator.addMethod(“nohtml”,function(v,e,o){var m = v.search(“\s]+))?)+\s*|\s*)/?>”);return m===-1;},$.format(“value cannot contain any HTML tags.”)); $.validator.addMethod(“false”,function(v,e,o){ if (v===”){return true;}var re = /^(0|false|no)$/i;return re.test(v);},$.format(“The value entered must be a false boolean.”)); });/*]]]]>*/]]>

Source