@local901/validator 0.2.0 → 0.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.
package/package.json
CHANGED
|
@@ -19,7 +19,7 @@ class ObjectValidator extends Validator_1.Validator {
|
|
|
19
19
|
// Check for excess keys.
|
|
20
20
|
const fieldKeys = Object.keys(this.fields);
|
|
21
21
|
const inputKeys = Object.keys(input);
|
|
22
|
-
const extraKeys =
|
|
22
|
+
const extraKeys = fieldKeys.filter((k) => !inputKeys.includes(k));
|
|
23
23
|
// Check field types
|
|
24
24
|
let hasError = false;
|
|
25
25
|
const fields = Object.fromEntries(Object.entries(this.fields).map(([key, validator]) => {
|