title: Jquery Regex - check one or multiple comma separated values (12 hex characters)
body: <p>I currently have a textbox that can take one or multiple (comma separated) values.</p>
  
  <p><code>var textBox = $('#testValues').val().split(",");</code></p>
  
  <p>I'm trying to add regex validation that when users enter one or multiple values (always has to be 12 hex characters) and hit submit, then the regex checks and makes an API call if it passes else throws an alert message.</p>
  
  <p>I currently have like this. 
  <code>var regexValidation = new RegExp("^[a-zA-Z0-9]{0,12}$");</code></p>
  
  <p><code>if (regexValidation.test(textBox)) { apiCall }</code> 
  <code>else { alert('Regex validation failed'); return false;}</code></p>
  
  <p>It works great when I ONLY entered 1 value. However, if I try to enter multiple values with "," then it just throws an alert message. I do not want to add a comma in the regex because then it will take 12 hex characters including a comma. How should I handle it?</p>
  
  <p>Thank you.</p>