定制模型验证反馈
我想更改在我的 nopCommerce Web 应用程序中向用户显示验证消息的方式。目前,它显示为:
我想更改它,以便如果登录凭据是不正确,输入字段会出现红色边框,并且文本 [ 错误凭据 ] 将设置为输入字段的占位符。
我尝试禁用代码:
@Html.ValidationSummary(true, T("Account.Login.Unsuccessful").Text)
但这只是带走了所有验证反馈。我怎样才能实现我上面提到的目标?
I want to change the way a validation message appears to the user in my nopCommerce web application. Currently, it appears as so:
I want to change that, so that if and when the login credentials are incorrect, the input fields get a red border, and the text [ wrong credentials ] to be set as Placeholder for the input fields.
I tried disabling the code:
@Html.ValidationSummary(true, T("Account.Login.Unsuccessful").Text)
But that just took away all validation feedback. How can I achieve what I mentioned above?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
完整更新代码
CSS Jquery 代码
这是使用 $.ajax 检查登录的
Here is the complete Updated code
CSS
Jquery code to check the login using $.ajax