In my scenario I was entering in a MC in the bin range 222100–272099 and once I entered in 27, isPotentiallyValid returns false. If I continue to type in 7 it is still false but once I type 0 is is now potentially valid again.
The problem was that we didn't have 27 and 27[0-2] listed as potentially valid in the prefix pattern.
Reported here: https://github.com/braintree/card-validator/issues/49
The problem was that we didn't have 27 and 27[0-2] listed as potentially valid in the prefix pattern.