Rush StackShopBlogEvents
Skip to main content

Home > @rushstack/node-core-library > JsonSchema > validateObjectWithCallback

JsonSchema.validateObjectWithCallback() method

Validates the specified JSON object against this JSON schema. If the validation fails, a callback is called for each validation error.

Signature:

validateObjectWithCallback(jsonObject: JsonObject, errorCallback: (errorInfo: IJsonSchemaErrorInfo) => void, options?: IJsonSchemaValidateObjectWithOptions): void;

Parameters

Parameter

Type

Description

jsonObject

JsonObject

errorCallback

(errorInfo: IJsonSchemaErrorInfo) => void

options

IJsonSchemaValidateObjectWithOptions

(Optional)

Returns:

void