Widgets > Input Widgets > wijinputmask > Require Letters |
The wijinputmask widget allows you to create a mask that requires users to enter letters, for example, in an input box for a user name. Use the L masking element for the mask option to take advantage of this feature. See the InputMask > First Name sample of the MVC Control Explorer live demo at http://demo.componentone.com/ASPNET/MVCExplorer/inputmask/FirstName.
<body>
tags of the page.
<input type="text" id="textbox1" />
<h6>Mask</h6>
<p> >L|LLLLLLLLL</p>
</div>
</div>
tags you added in the previous step, enter the following jQuery script to initialize the wijinputmask widget and set the mask option. Using an L as the masking element requires that a letter is entered. In this case, 10 letters can be entered. The >L| ensures the first letter is capitalized and the letters that follow are lowercase, unless the Shift key is used to capitalize other letters.
<script id="scriptInit" type="text/javascript">
$(document).ready(function () {
$("#textbox1").wijinputmask(
{
mask: '>L|LLLLLLLLL',
hidePromptOnLeave: true
});
});
</script>