我想在MVC中应用验证,如果用户名和密码是“管理员”,那么登录不应该与“管理员”... [英] i want to apply a Validation In MVC that if user name and pwd is "ADMIN", then Login should not be there with "admin"...

查看:80
本文介绍了我想在MVC中应用验证,如果用户名和密码是“管理员”,那么登录不应该与“管理员”...的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在MVC中应用验证,如果用户名和密码是ADMIN,那么登录不应该与admin...我希望在登录密码中的字母案例验证...告诉我

i want to apply a Validation In MVC that if user name and pwd is "ADMIN", then Login should not be there with "admin"... i want letter case validation in login password... tell me

推荐答案

我建​​议将密码保存为MD5。每次用户登录系统时都要检查它。这将提高安全性并解决您的问题。
I would suggest to save password as MD5. And check it each time user login into the system. This will increase the security and will solve your problem.


正则表达式库 [ ^ ]

如果你有你的要求,请点击这里。

但如果你只想要大写字母,那么你可以使用ASCII码并检查javascript,然后允许打电话给其他人显示来自javascript本身的警告或错误消息。

希望这有帮助

谢谢。:)
Regular expression Library[^]
Check here if you get your requirement.
But if you only want Capital letters, then you can use ASCII codes and check in the javascript and then allow the call to happen else show an alert or error message from the javascript itself.
Hope this helps
Thanks.:)


这篇关于我想在MVC中应用验证,如果用户名和密码是“管理员”,那么登录不应该与“管理员”...的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆