note: better to set * instead of +, so as to accept a null credit card number (as it is the case today).
both validators, the Luhn one as well as the pattern one, already allow for null values. The question is about the empty string which probably should be treated as invalid.
|