Public
Edited
Dec 16
Insert cell
Insert cell
schema = ({
$schema: "http://json-schema.org/draft-07/schema#",
type: ["string", "invalid_type"],
required: "should_be_array_not_string",
properties: {
age: {
type: "integer",
minimum: "10",
maximum: false
}
},
additionalProperties: "should_be_boolean",
minItems: -5,
pattern: "[This is not a valid regex"
})
Insert cell
{
const isValid = ajv.validateSchema(schema);
return ajv.errorsText();
}
Insert cell
ajv = {
const Ajv = (await import("https://cdn.jsdelivr.net/npm/ajv@8.17.1/+esm"))
.Ajv;
const ajv = new Ajv({ allErrors: true });
return ajv;
}
Insert cell

Purpose-built for displays of data

Observable is your go-to platform for exploring data and creating expressive data visualizations. Use reactive JavaScript notebooks for prototyping and a collaborative canvas for visual data exploration and dashboard creation.
Learn more