A dictionary of custom mask rules. Each key denotes the class of characters (appearing in the mask) and the value is a function, accepting a character input from by user and returning a Boolean true or false value to indicate whether it is a valid for that class of characters or not.

The code below demonstrates a custom rule definition.

<input id="maskedtextbox" />

<script type="text/javascript">
jQuery(function($) {
        mask: "#000#",
        rules: {
            "#": function (char) {
                // allow only the "#" symbol
                return char === "#";