title: Javascript regex for email and empty string
body: <p>I'm using this regex <code>/^[a-zA-Z0-9._-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,6}$/</code> for validating email format but when I leave the the email field blank it shows an error that the format is invalid. Can somebody help me how to add a regex for empty string?</p>