@types/z-schema
Advanced tools
Comparing version 3.16.31 to 3.16.32
@@ -28,2 +28,3 @@ // Type definitions for z-schema v3.16.0 | ||
ignoreUnknownFormats?: boolean; | ||
customValidator?: (report: Report, schema: any, json: any) => void; | ||
} | ||
@@ -147,2 +148,17 @@ | ||
/** | ||
* Basic representation of the Report class -- just enough to support customValidator | ||
*/ | ||
declare class Report { | ||
/** | ||
* @param errorCode - a string representing the code for the custom error, e.g. INVALID_VALUE_SET | ||
* @param errorMessage - string with the message to be returned in the error | ||
* @param params - an array of relevant params for the error, e.g. [fieldName, fieldValue] | ||
* @param subReports - sub-schema involved in the error | ||
* @param schemaDescription - description from the schema used in the validation | ||
* Adds custom error to the errors array in the validation instance and sets valid to false if it is not already set as false | ||
*/ | ||
addCustomError: (errorCode: string, errorMessage: string, params: string[], subReports: string, schemaDescription: string) => void; | ||
} | ||
export = Validator; |
{ | ||
"name": "@types/z-schema", | ||
"version": "3.16.31", | ||
"version": "3.16.32", | ||
"description": "TypeScript definitions for z-schema", | ||
"license": "MIT", | ||
"author": "pgonzal <https://github.com/pgonzal>", | ||
"contributors": [ | ||
{ | ||
"name": "pgonzal", | ||
"url": "https://github.com/pgonzal", | ||
"githubUsername": "pgonzal" | ||
} | ||
], | ||
"main": "", | ||
@@ -14,5 +20,4 @@ "repository": { | ||
"dependencies": {}, | ||
"peerDependencies": {}, | ||
"typesPublisherContentHash": "39b9bd1a0a2915457b7b5e8cd46573459401d0c1d31fbcee69e509fec4056fcf", | ||
"typesPublisherContentHash": "26bfaea62877c1ebc8606732e15fbbaea41340dccd171f5712a578b771a10c11", | ||
"typeScriptVersion": "2.0" | ||
} |
@@ -8,6 +8,6 @@ # Installation | ||
# Details | ||
Files were exported from https://www.github.com/DefinitelyTyped/DefinitelyTyped/tree/master/z-schema | ||
Files were exported from https://www.github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/z-schema | ||
Additional Details | ||
* Last updated: Thu, 19 Jan 2017 17:38:56 GMT | ||
* Last updated: Fri, 05 Jan 2018 17:52:48 GMT | ||
* Dependencies: none | ||
@@ -14,0 +14,0 @@ * Global values: none |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
7881
144