Skip to main content
Latest
function validate
import { validate } from "https://deno.land/x/schema_validator@v0.0.3/src/validator.ts";

validate - will compare json object and defined schema

Parameters

value: any
  • json object
schema: any
  • schema definition
optional
options: IOptions
  • Validator configuration object

Returns

Error | null

Error | null - if value aganist schema fails then return Error otherwise null.