Skip to content

Commit e617508

Browse files
authored
Merge pull request #6 from balavishnuvj/feat/support-extra-info
Adds: Support for extra info in config
2 parents f05f053 + cbf36ad commit e617508

File tree

2 files changed

+1
-6
lines changed

2 files changed

+1
-6
lines changed

src/constants.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ const PER_FIELD_CONFIG = {
4444
optional: true,
4545
},
4646
validationFns: { type: "array", items: "function", optional: true },
47+
extraInfo: { type: "any", optional: true },
4748
};
4849

4950
export const PER_FIELD_SCHEMA = {

src/schema-validator.js

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,6 @@ const validator = new Validator({
66
},
77
});
88

9-
// Register a custom 'regex' validator
10-
// validator.add("regex", (value) => {
11-
// if (!(value instanceof RegExp))
12-
// return validator.makeError("regex", null, value);
13-
// return true;
14-
// });
159
validator.add("regex", function ({ schema, messages }, path, context) {
1610
return {
1711
source: `

0 commit comments

Comments
 (0)