Javascript in list
<p>What's the easiest way to check to see if a number is in a comma delimited list?</p>

<pre><code>console.log(provider[cardType]);
    //returns: Object { name="visa", validLength="16,13", prefixRegExp=}

if (ccLength == 0 || (cardType &gt; 0 &amp;&amp; ccLength &lt; 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 &lt; 3) {
        triggerNotification('x', 'You must provide a CCV');
        return false;
}
</code></pre>
