I’m trying to mask textboxes using jquery ie: phone numbers. I thought a better way to do it might be to apply a class to any field that I give the UIHint of “phone” to on the model. I can’t seem to find any examples of how to do this with basic string fields. The datetime examples that abound are great, but they are based on a specific type.
Can anyone point me in the right direction on how to accomplish this? Or slap me upside the head if it’s a bad idea? 😉
In MVC 3, you can use a data annotation on your model, like so: