I'm new to jQuery and was wondering how to use it to validate email addresses.
相关问题
- How to fix IE ClearType + jQuery opacity problem i
- jQuery add and remove delay
- Include empty value fields in jQuery .serialize()
- Disable Browser onUnload on certain links?
- how to get selected text from iframe with javascri
Bug is in Jquery Validation Validation Plugin Only validates with @ to change this
change the code to this
you should see this:jquery.validate.js,add it to your project
using it like this:
Javascript Email Validation in MVC/ASP.NET
The problem I came across while using Fabian's answer, is implementing it in an MVC view because of the Razor
@
symbol. You have to include an additional@
symbol to escape it, like so:@@
To Avoid Razor In MVC
I didn't see it elsewhere on this page, so I thought it might be helpful.
EDIT
Here's a link from Microsoft describing it's usage.
I just tested the code above and got the following js:
Which is doing exactly what it's supposed to do.
Use Like This :
use this