Java Script

Email Validation onblur in JavaScript

Spread the love

Check Email Validation onblur event in Javascript –

In this example, I have checked email validation on onblur by regular expression.

  • Add onblur event to input box.
<input type="email" name="email_id" id="email_id" value="" placeholder="" maxlength="100" onblur="checkEmailValidation(this.value)">
  • Here checkEmailValidation(str) function is defined and called on onblur event in the input box.
<script type="text/javascript">

function checkEmailValidation(str)
    var regexp = /^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;
    alert("Please Enter a Valid E-mail Address!");


Click here to read more …

Email Validation onblur in JavaScript

Leave a Reply

Your email address will not be published. Required fields are marked *