Labels

slider

Recent

Navigation

Jquery Validation: Email Validation using Jquery

Email Validation using Jquery, Email Validation in Jquery, Jquery Validation, email format expression

Introduction

This is my second post on Jquery Validation, In my previous post, I explained in detail about Numeric Validation using Jquery, now I am going to explain about Email Validation using Jquery.

Input Box to input Email





Email Expression Format


/^([\w-\.]+)@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.)|(([\w-]+\.)+))([a-zA-Z]{2,4}
|[0-9]{1,3})(\]?)$/

Above Email expression is used to validate email format expression using Jquery

Replace @ to @@ in MVC Razor View

Now code will like as below specially in MVC Razor Engine View
/^([\w-\.]+)@@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.)|(([\w-]+\.)+))([a-zA-Z]{2,4}|[0-9]
{1,3})(\]?)$/

While Typing Invalid Email Throwing Error Message

Jauery Email Validation

CSS Code For Error Message


#errmsg
{
color: red;
}

Final Code View to validate Email Expression using Jquery



Conclusion

I have explained in detail to review Email Expression Validation using Jquery. Jquery validation is very useful to validate in Browser side (Client Side Validation).

Suggested Reading

Share

Anjan kant

Outstanding journey in Microsoft Technologies (ASP.Net, C#, SQL Programming, WPF, Silverlight, WCF etc.), client side technologies AngularJS, KnockoutJS, Javascript, Ajax Calls, Json and Hybrid apps etc. I love to devote free time in writing, blogging, social networking and adventurous life

Post A Comment:

1 comments: