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
CSS Code For Error Message
#errmsg { color: red; }
test with fiddle, it is working well.
ReplyDelete