Skip to content

Commit 57a5a6a

Browse files
committed
fix tests
1 parent a8dae9a commit 57a5a6a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/validation.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ export function checkRules(rules: ValidationRules = {}, value: mixed) {
1313
const config = rules[rule];
1414
const options = (typeof config !== 'boolean') && config.options;
1515
const errorMessage = (typeof config !== 'boolean') ? config.errorMessage : GENERIC_ERROR_MESSAGE;
16-
const result = validatorFn(value, options);
16+
const result = options ? validatorFn(value, options) : validatorFn(value);
1717
if (!result) errors.push({ errorMessage, value });
1818
return result && acc;
1919
}, true);

0 commit comments

Comments
 (0)