Card number structure
A card number is not one field. The first 6 to 8 digits are the issuer identification number, the digits after it identify the account, and the final digit is a Luhn check digit computed over everything before it.
Length varies by issuer. American Express uses 15 digits, most Visa and Mastercard numbers use 16, and UnionPay and Discover run as long as 19.
Test numbers
Published test numbers such as 4539578763621486 pass Luhn by construction, which is why they work in sandbox checkouts. They are safe to paste here because the check is arithmetic on the digits and nothing more.
Use the result to catch a typo before an import or a support ticket. It will not tell you whether a card is active, and it cannot detect a number that was copied correctly but belongs to someone else.