I am using ajv-errors with ajv v8 - According to docs I should be able to use a pointer to reference the field name but my attempts are failing with errors such as: Cannot access property/index 0 levels up, current level is 0
Example schema:
{
$schema: "http://json-schema.org/draft-07/schema#",
type: "object",
additionalProperties: false,
properties: {
name: { type: "string" }
},
required: ["name"],
errorMessage: {
required: 'Field ${0#} is so required'
}
}
Any ideas? I could probably use an absolute pointer but am not sure what data this is actually referring to in order to create a path.