mask

mask - string (default: '')

Designates the input mask. The following mask rules are supported:

  • 0 - Digit placeholder, allows digits between 0 and 9.
  • 9 - Digit or space placeholder, allows digits between 0 and 9 or space.
  • # - Digit or space placeholder, allows digits between 0 and 9 or space or +/- symbols.
  • L - Letter placeholder, allows input letters a-z and A-Z. In regular expression equivalent to [a-zA-Z].
  • ? - Letter or space placeholder, same as previous placeholder but allowing space too.
  • & - Any non-space character.
  • C - Any character, including space characters.
  • A - Alphanumeric, allows letters and digits only.
  • a - Alphanumeric or space, allows letters, digits and space only.
  • . - Decimal separator placeholder. It will be taken from current culture.
  • , - Thousands separator placeholder. It will be taken from current culture.
  • $ - Currency symbol placeholder. It will be taken from current culture.

The code below demonstrates a numeric mask.

<input id="maskedtextbox" />
<script type="text/javascript">

jQuery(function($) {
     $("#maskedtextbox").shieldMaskedTextBox({
           mask: "000,000.00"
     });
}

</script>