We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent feea56b commit b41ea0bCopy full SHA for b41ea0b
README.md
@@ -294,6 +294,29 @@ const schema = {
294
}
295
```
296
297
+#### Referring to Field Names
298
+
299
+Field names can be referred to by using the relative `0#` JSON-pointer.
300
301
+Example which prints additional properties that cause validation error:
302
303
+```javascript
304
+const schema = {
305
+ type: "object",
306
+ properties: {
307
+ size: {
308
+ type: "number",
309
+ },
310
311
+ additionalProperties: {
312
+ not: true,
313
+ errorMessage: “extra property is ${0#}”
314
+ }
315
+}
316
+```
317
318
319
320
## Options
321
322
Defaults:
0 commit comments