@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.cjs.js +2 -3
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +2 -3
- package/dist/index.esm.js.map +1 -1
- package/package.json +2 -2
package/dist/index.cjs.js
CHANGED
|
@@ -40331,8 +40331,7 @@ validatorFns[NO_MORE_THAN_SIX_NUMBERS] = (value) => {
|
|
|
40331
40331
|
* https://stripe.com/en-ca/resources/more/how-to-use-the-luhn-algorithm-a-guide-in-applications-for-businesses#luhn-algorithm-formula
|
|
40332
40332
|
*/
|
|
40333
40333
|
|
|
40334
|
-
function luhnValid(string) {
|
|
40335
|
-
if (!string) {
|
|
40334
|
+
function luhnValid(string) { if (!string) {
|
|
40336
40335
|
return false;
|
|
40337
40336
|
}
|
|
40338
40337
|
|
|
@@ -40384,7 +40383,7 @@ validatorFns[INCLUDES_POTENTIAL_CARD_NUMBER] = (value) => {
|
|
|
40384
40383
|
// A potential credit card number is a sequence of 8 to 20 digits, with optional spaces or hyphens between them
|
|
40385
40384
|
const regexString = '(?:\\d[ -]*){8,20}';
|
|
40386
40385
|
const regex = new RegExp(regexString);
|
|
40387
|
-
return
|
|
40386
|
+
return !(luhnValid(value) && regex.test(value));
|
|
40388
40387
|
};
|
|
40389
40388
|
|
|
40390
40389
|
const NUMBER_LESS_THAN = 'validator/NUMBER_LESS_THAN';
|