title: mac-address-validation in javascripts (00:00:00:00:00:00)
body: <p>Can anyone send javascript code to validate the network mac address (eg. <code>02:41:6d:22:12:f1</code>) It accepts value from <code>00:00:00:00:00:00</code> to  <code>ff:ff:ff:ff:ff:ff</code>. On keypress event of textbox, I need to allow characters <code>0-9</code>, <code>a-f</code> and <code>:</code> (colon). What I have so far is</p>
  
  <pre><code>macPattern = /^([0-9a-fA-F]{2}[:-]){5}[0-9a-fA-F]{2}$/i;
  </code></pre>
  
  <p>With this I am able throw exception for <code>ff:ff:ff:ff:ff:ff</code> but I also need to throw an exception for <code>00:00:00:00:00:00</code>. My pattern is not throwing an exception.</p>
  
  <p>Could you please give me a pattern through which I should able to throw an exception for both  <code>ff:ff:ff:ff:ff:ff</code> and <code>00:00:00:00:00:00</code>.</p>