Skip to content

Commit 7d7ecfb

Browse files
committed
v5.0.4: fixes #279
1 parent d9bd15d commit 7d7ecfb

File tree

3 files changed

+12
-3
lines changed

3 files changed

+12
-3
lines changed

Diff for: index.d.ts

+9
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,8 @@ declare namespace Validator {
8787
}
8888

8989
declare class Validator {
90+
public lastReport: Report | undefined;
91+
9092
/**
9193
* Register a custom format.
9294
*
@@ -152,6 +154,13 @@ declare class Validator {
152154
* Basic representation of the Report class -- just enough to support customValidator
153155
*/
154156
declare class Report {
157+
errors: Validator.SchemaErrorDetail[];
158+
159+
/**
160+
* Returns whether the validation did pass
161+
*/
162+
isValid(): boolean;
163+
155164
/**
156165
* @param errorCode - a string representing the code for the custom error, e.g. INVALID_VALUE_SET
157166
* @param errorMessage - string with the message to be returned in the error

Diff for: package-lock.json

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "z-schema",
3-
"version": "5.0.3",
3+
"version": "5.0.4",
44
"engines": {
55
"node": ">=8.0.0"
66
},

0 commit comments

Comments
 (0)