title: Show error : valid email address in magento
body: <p>I am using magento 1.8. I am new to magento, so on the checkout page, when I enter the email address, it shows a popup with " enter valid email address". </p>
  
  <p>Again when I enter the email id and password in already registered column, it works.</p>
  
  <p>What is the problem and where I should find the email validation file in magento ?</p>
  
  <p>And how to validate the email id?</p>
  
  <p><img src="https://i.stack.imgur.com/sk5il.png" alt="enter image description here"></p>
  
  <p>I am using this code </p>
  
  <pre><code>  &lt;?php if(!$this-&gt;isCustomerLoggedIn()): ?&gt;
                  &lt;div class="field"&gt;
                      &lt;label for="billing:email" class="required"&gt;&lt;em&gt;*&lt;/em&gt;&lt;?php echo $this-        &gt;__('Email Address') ?&gt;&lt;/label&gt;
                      &lt;div class="input-box"&gt;
                          &lt;input type="text" name="billing[email]" id="billing:email" value="&lt;?php       echo $this-&gt;htmlEscape($this-&gt;getAddress()-&gt;getEmail()) ?&gt;" title="&lt;?php echo $this-&gt;__('Email    Address') ?&gt;" class="string input-block-level input-text validate-email required-entry billing-email" /&gt;
                      &lt;/div&gt;
                  &lt;/div&gt;
      &lt;?php endif; ?&gt;
  </code></pre>
  
  <p>validation of email id:</p>
  
  <pre><code>    "validate-emails": [
          function(value) {
              if ($.mage.isEmpty(value)) {
                  return true;
              }
              var valid_regexp = /^[a-z0-9\._-]{1,30}@([a-z0-9_-]{1,30}\.){1,5}[a-z]{2,4}$/i,
                  emails = value.split(/[\s\n\,]+/g);
              for (var i = 0; i &lt; emails.length; i++) {
                  if (!valid_regexp.test(emails[i].strip())) {
                      return false;
                  }
              }
  </code></pre>