ASP.NET AJAX 中的 MaskedEditValidator 问题

发布于 2024-08-21 00:10:49 字数 259 浏览 2 评论 0原文

我有一个文本框可以输入电话号码。我正在使用 AJAX MaskedEditExtender 和 MaskedEditValidator 来验证手机。

我对掩码没有问题,但问题是,当我输入例如 3 个数字然后失去焦点时,什么也没有发生,但一旦焦点集中,我就会看到错误消息,只要我写一个数字,它就会消失。

如果用户在失去焦点后没有输入 9 个数字,我想要得到的所有错误消息。

这是我的代码:

I have text box to enter a phone number. I'm using AJAX MaskedEditExtender and MaskedEditValidator to validate the phone.

I have no problem with mask but the problem nothing happen when I enter for example only 3 number then lose the focus but as soon the focus on I will see the error message and it will disappear as soon as I write one number.

all what I want to get the error message if the user did not enter 9 numbers after lose the focus.

here is my code:

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

走野 2024-08-28 00:10:49

我错过了分配一些 MaskedEditValidator 属性,该属性是要验证的扩展程序。

I missed to assign some of the MaskedEditValidator property which is extender to validate.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文