Are you an LLM? You can read better optimized documentation at /documentation/api/core/functions/validate.md for this page in Markdown format
ws-asyncapi API / core / validate
Function: validate()
validate(
schema,value):Promise<ValidationResult>
Defined in: .api-entries/core/index.d.ts:180
Validate value against schema (a Standard Schema validator, which may run sync or async). Returns the parsed value on success (so transforms / coercion / defaults are applied), or normalized issues on failure. A value that isn't a Standard Schema is treated as "no validation" and passes through.
Parameters
schema
value
unknown
Returns
Promise<ValidationResult>