Refatoring validateCardNumber