There are two factors to consider when deciding how to handle the problem of a work sample: sample size and population characteristics. Sample size is determined by a formula based on the power of the sample or its ability to represent the population with a predictable margin of error.
The resulting complexity makes card type detection code difficult to write, read, and maintain. As an example of this complexity, consider this JavaScript regular expression used to detect Discover card numbers starting with 6011, 622126-622925, 644-649, and 65:
I'm not sure if you're asking what the card number is on a Visa debit card, or if it is different than a Visa credit card... so I will try to answer both. A Visa card # is a 16-digit number, that uses a specific format. In order to be a valid number, the 16 digits have to work within the Mod 10 algorithm. All Visa numbers start with a 4. MasterCard numbers start with a 5, Amex is 3, and then there are a few others, including Discover card, etc.