任何人都知道任何与MVC Unobtrusive Validation一起使用的jQuery Mask插件吗?

Jas*_*era 6 jquery-plugins maskedtextbox unobtrusive-validation asp.net-mvc-3

我一直在ASP.Net应用程序中使用以下掩码输入插件:

http://digitalbush.com/projects/masked-input-plugin/

不幸的是,这不适合MVC不显眼的验证.验证会在每个令人讨厌的密钥上触发.另外,当输入失去焦点时,regex属性总是失败,因为它在掩码控件清除之前将掩码读取为实际用户输入.

有人遇到过蒙面文本框解决方案,可以很好地运行MVC验证吗?

Sai*_*war 0

先生,您可以使用 Bootstrap 占位符来显示掩码链接,例如

<div class="input-group">
  <span class="input-group-addon" id="basic-addon1">@</span>
  <input type="text" class="form-control" placeholder="Username" aria-describedby="basic-addon1">
</div>
Run Code Online (Sandbox Code Playgroud)

在此输入图像描述