We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3faf14e commit 93206e7Copy full SHA for 93206e7
packages/validate/src/validators.js
@@ -38,7 +38,10 @@ export const isEmailValidator = () => [(...params) => ({ isEmail: isEmail(...par
38
* @param {number} value to check
39
*/
40
export const isNumber = value => value === value && typeof value === 'number'; // eslint-disable-line no-self-compare
41
-export const isNumberValidator = () => [(...params) => ({ isNumber: isNumber(...params) })];
+export const isNumberValidator = (...factoryParams) => [
42
+ (...params) => ({ isNumber: isNumber(...params) }),
43
+ ...factoryParams,
44
+];
45
46
export const minNumber = (value, min) => isNumber(value) && value >= min;
47
export const minNumberValidator = (...factoryParams) => [
0 commit comments