Javascript in list -
what's easiest way check see if number in comma delimited list?
console.log(provider[cardtype]); //returns: object { name="visa", validlength="16,13", prefixregexp=} if (cclength == 0 || (cardtype > 0 && cclength < provider[cardtype].validlength)) { triggernotification('x', 'your credit card number isn\'t long enough'); return false; } else { if ($('.credit-card input[name="cc_cvv"]').val().length < 3) { triggernotification('x', 'you must provide ccv'); return false; }
seems similar this question.
just .split() csv , use inarray.
Comments
Post a Comment