<p>Does anyone have a library or JavaScript snippet to validate the check digit of credit cards before the user hits Submit?</p>

The
jQuery Validation Plugin
has a
method
for validating credit card numbers.
There are other specific scripts:
JavaScript Credit Card Validation Function
Credit Card Validation
Most of them use the
Luhn algorithm
.