Mask JavaScript API (v)

This is the test script for the Mask JSAPI library. Please use this page to test different mask formatting commands and please report any errors to

The dynamic masking will not work in NS4 at the moment, as I haven't gotten that far, but I believe it should work in most DHTML compatible browsers. If you find any problems or make changes, please let me know.

UPDATE - Dec 5, 2007: While I had no plans to update this library, I did change the offset used to guess the correct century when a 2-digit year is supplied. It used to use an offset of +20 years, it now uses an offset of +5 years. Essentially this means if the 2-digit year is greater than 5 years in the future, it'll assume the date is in the previous century.

Masking Report

On the great suggestion by Cameron Childress, I've set up this small form to allow you to report your results to me. Don't feel required to supply your name or email, I'm only asking in order to contact you back about the results. I'm not mining this e-mail address or anything else--it's completely confidential.

To report the results of this test back to me, just click the "Report Results" button and let your browser do the rest of the work. :)


Dynamic Field Masking

US Phone Number:

Generic: (###) ###-####

US Dollar:

Number: $#,###.00

US Date:

Date: mm/dd/yyyy