Does anyone know of any jQuery Mask Plugin that works with MVC Unobtrusive Validation?

I have always used the following mask input plugin in my ASP.Net applications:

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

Unfortunately, this does not work well with unobtrusive MVC validation. Validation is triggered on every run, which is annoying. In addition, the regex attribute always fails when an input loses focus because it reads the mask as actual user input before mask control clears it.

Does anyone come across a masked text solution that works well with MVC validation?

+6
source share
1 answer

Sir you can use the Bootstrap placeholder to display the Link mask , for example

<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> 

enter image description here

0
source

Source: https://habr.com/ru/post/920125/


All Articles