Howdy All!
I am implementing a ticket barcode validation application for my reservation system.
The ticket bar-codes are 20 characters long. Each barcode starts with a +, has 18 Alphanumeric (A-F | 0-9) characters, and ends in a -.
In DevExpress TcxMaskEdit, I am able to use the following regular expression mask:
[+](\d | [A-F] | [a-f]){18}[-]
I tried using the mask option in JQEdit and the closest I could get is:
+******************-
which doesn't work because the mask validation code treats the + and - as "formatting" characters instead of input which I need because of barcodes contain them.
I was looking the http://digitalbush.com/projects/masked-input-plugin/ page and apparently it is possible to create your own mask definitions.
Could someone please tell how I would create something like:
jQuery(function($)
{
$.mask.definitions['B'] = "[A-Fa-f0-9]";
$.mask.definitions['~'] = "[+]";
$.mask.definitions['#'] = "[-]";
$("#TicketBarCode").mask("~BBBBBBBBBBBBBBBBBB#");
});
and add it to a JQEdit control?
Thanks in advance!
Aggie85