simple-validators
Advanced tools
Comparing version 1.0.4 to 1.0.5
@@ -89,3 +89,3 @@ import type { KeyOptions, ValidationOptions } from './types.js'; | ||
/** | ||
* Validates value is an object | ||
* Validates value is an object with string keys | ||
*/ | ||
@@ -92,0 +92,0 @@ export declare function validateObject(input: any, opts: ValidationOptions): Record<string, any> | undefined; |
@@ -209,3 +209,3 @@ import { formatDate } from './utils.js'; | ||
/** | ||
* Validates value is an object | ||
* Validates value is an object with string keys | ||
*/ | ||
@@ -215,2 +215,4 @@ export function validateObject(input, opts) { | ||
return validationError(`must be object`, opts); | ||
if (Array.isArray(input)) | ||
return validationError(`must be object, not array`, opts); | ||
return input; | ||
@@ -217,0 +219,0 @@ } |
{ | ||
"name": "simple-validators", | ||
"version": "1.0.4", | ||
"version": "1.0.5", | ||
"license": "MIT", | ||
@@ -5,0 +5,0 @@ "description": "Schema validation functions and error reporting framework", |
Sorry, the diff of this file is not supported yet
25253
495