One, download the dependency packageNET disk Download: Https://yunpan.cn/cryvgGGAQ3DSW access password f224Second, add a separate plugin jquery.validate.messages_cn. js.Change the default prompt mode.Third, jquery form validation plug-in----by the Name property to correlate fields to verify that Officer rules are written into the JS code. for= "Cusername" > Name for= "Cemail" > Email for= "curl" > URL for= "Ccomment" > Your comments
This article illustrates how jquery uses regular expressions to validate email addresses. Share to everyone for your reference. The implementation methods are as follows:
Copy Code code as follows:
Enter Email address:
PS: Here again for you to provide 2 very convenient regular expression tools for your reference to use:
JavaScript Regular expression online test tool:Http://tools.jb51
A jquery.validate bubble hint was made in the recent project.
Like the latest version of the Jquery.validate, there is this function, but it is not very useful in my place.
Just add one for yourself.
Find some plug-ins qtip2 style is good, but I do not show it locally. He also has an example of jquery.validate. But the style is not shown here. It seems the jquery version asked him to use his jquery to show
Problem: The validation plug-in of jquery validate is used in the project, and the page is almost done, and the prompt information will make the form deformation, making the page very ugly
Solution: 1. display the error information on the top of the page.
Good references:
1. http://paskaa.iteye.com/blog/280295
2. http://blog.csdn.net/lord_is_layuping/archive/2010/02/22/5318168.aspx
3. http://www.jb51.
Recently, the jQuery. validate. js plug-in is required for the project, so you can record some of your work experience for future study.
[Example]
1. Foreground page
2. Javascript
3. background processing program
Public void ProcessRequest (HttpContext context) {context. response. contentType = "text/plain"; string action = context. request ["action"]; // obtain the username and custom parameter string
In many cases, we do not fill in all the information in one step, and then submit it. Instead, enter the form step by step, as shown below:
Step 1 fill in the basic information,
Step 2 fill in the Education Information
Verification is required for each step, so that verification can be performed in the following ways:
Here, we mainly use the valid () and isvalid methods in jquery validate, which is ve
clientvalidationenabled in ASP. NET MVC 5, clientvalidationenabled defaults to True, so there is no need to deliberately set
Apply Validationattribute Here to use the built-in RequiredAttribute to demonstrate public class Book { [Required (errormessage = "BookID is Required")] public string BookID {get; set;} public string Title {get; set;} public string Date {get; set;}
Reference related JqueryClient View OverviewIn this example, when you submit a form,
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.