In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-09-23 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/03 Report--
This article mainly explains "how to achieve Asp.Mvc 2.0 user client authentication". The content of the article is simple and clear, and it is easy to learn and understand. Please follow the editor's train of thought to study and learn "how to achieve Asp.Mvc 2.0 user client authentication".
First, let's take a look at the verification effect of the registration page.
The above verification mainly includes
1. User name cannot be empty
two。 Password cannot be empty, password length cannot be less than 5 digits
3. The confirmation password cannot be empty, the length of the confirmation password cannot be less than 5 digits, and the confirmation password must be the same as entered in the password text box
4. The mailbox format must be correct.
Here is the code to validate using the jquery.validate plug-in
[html] Registration page $(). Ready (function () {$("# form1"). Validate ({rules: {UserName: {required: true}, UserPwd: {required: true, minlength: 6}, ConfirPwd: {required: true, minlength: 6, equalTo: "# UserPwd"}, Email: {email: true}} Messages: {UserName: {required: "user name cannot be empty!"}, UserPwd: {required: "password cannot be empty!", minlength: jQuery.format ("password length cannot be less than {0} characters!")}, ConfirPwd: {required: "confirm password cannot be empty!", minlength: jQuery.format ("confirm password length cannot be less than {0} characters!") EqualTo: "two passwords are inconsistent!"}, Email: {email: "incorrect email input format!"}, onkeyup: false}) })
M.UserName)% > m.UserName)% > m.UserPwd)% > m.UserPwd)% > m.ConfirPwd)% > m.ConfirPwd)% > m.Email)% > m.Email)% >
$("# form1") .validate mainly includes two parts: rule rules and prompt messages.
For example
Rules: {UserName: {required:true},}
Text box input that indicates that ID is UserName cannot be empty.
Messages: {UserName: {required: "use ®? account name? no? can you use an empty?!"}
Give a prompt if the content of the text box indicating that ID is UserName is empty.
Thank you for your reading, the above is the content of "how to achieve Asp.Mvc 2.0 user client authentication". After the study of this article, I believe you have a deeper understanding of how to achieve Asp.Mvc 2.0 user client authentication, and the specific use needs to be verified in practice. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
The market share of Chrome browser on the desktop has exceeded 70%, and users are complaining about
The world's first 2nm mobile chip: Samsung Exynos 2600 is ready for mass production.According to a r
A US federal judge has ruled that Google can keep its Chrome browser, but it will be prohibited from
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
About us Contact us Product review car news thenatureplanet
More Form oMedia: AutoTimes. Bestcoffee. SL News. Jarebook. Coffee Hunters. Sundaily. Modezone. NNB. Coffee. Game News. FrontStreet. GGAMEN
© 2024 shulou.com SLNews company. All rights reserved.