redux-freeform 6.2.0 → 6.2.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.
@@ -203,7 +203,7 @@ validatorFns[INCLUDES_POTENTIAL_CARD_NUMBER] = (value) => {
203
203
  // A potential credit card number is a sequence of 8 to 20 digits, with optional spaces or hyphens between them
204
204
  const regexString = '(?:\\d[ -]*){8,20}';
205
205
  const regex = new RegExp(regexString);
206
- return regex.test(value) && luhnValid(value);
206
+ return !(luhnValid(value) && regex.test(value));
207
207
  };
208
208
 
209
209
  const NUMBER_LESS_THAN = 'validator/NUMBER_LESS_THAN';
@@ -199,7 +199,7 @@ validatorFns[INCLUDES_POTENTIAL_CARD_NUMBER] = (value) => {
199
199
  // A potential credit card number is a sequence of 8 to 20 digits, with optional spaces or hyphens between them
200
200
  const regexString = '(?:\\d[ -]*){8,20}';
201
201
  const regex = new RegExp(regexString);
202
- return regex.test(value) && luhnValid(value);
202
+ return !(luhnValid(value) && regex.test(value));
203
203
  };
204
204
 
205
205
  const NUMBER_LESS_THAN = 'validator/NUMBER_LESS_THAN';
@@ -205,7 +205,7 @@
205
205
  // A potential credit card number is a sequence of 8 to 20 digits, with optional spaces or hyphens between them
206
206
  const regexString = '(?:\\d[ -]*){8,20}';
207
207
  const regex = new RegExp(regexString);
208
- return regex.test(value) && luhnValid(value);
208
+ return !(luhnValid(value) && regex.test(value));
209
209
  };
210
210
 
211
211
  const NUMBER_LESS_THAN = 'validator/NUMBER_LESS_THAN';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "redux-freeform",
3
- "version": "6.2.0",
3
+ "version": "6.2.1",
4
4
  "description": "A small Redux form library that supports purely functional apps, without magic",
5
5
  "main": "dist/redux-freeform.cjs.js",
6
6
  "module": "dist/redux-freeform.esm.js",