@thecb/components 11.1.14-beta.0 → 11.1.14-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.esm.js CHANGED
@@ -40323,8 +40323,7 @@ validatorFns[NO_MORE_THAN_SIX_NUMBERS] = (value) => {
40323
40323
  * https://stripe.com/en-ca/resources/more/how-to-use-the-luhn-algorithm-a-guide-in-applications-for-businesses#luhn-algorithm-formula
40324
40324
  */
40325
40325
 
40326
- function luhnValid(string) {
40327
- if (!string) {
40326
+ function luhnValid(string) { if (!string) {
40328
40327
  return false;
40329
40328
  }
40330
40329
 
@@ -40376,7 +40375,7 @@ validatorFns[INCLUDES_POTENTIAL_CARD_NUMBER] = (value) => {
40376
40375
  // A potential credit card number is a sequence of 8 to 20 digits, with optional spaces or hyphens between them
40377
40376
  const regexString = '(?:\\d[ -]*){8,20}';
40378
40377
  const regex = new RegExp(regexString);
40379
- return regex.test(value) && luhnValid(value);
40378
+ return !(luhnValid(value) && regex.test(value));
40380
40379
  };
40381
40380
 
40382
40381
  const NUMBER_LESS_THAN = 'validator/NUMBER_LESS_THAN';