ajv-validator / ajv-validator/ajv-errors
Question: use enum values in custom error message
Aperta
- Lingua principale
- TypeScript
- Stelle
- 289
- Fork
- 21
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Descrizione
I have the following schema
```
const shared_schema = {
$id: "shared_schema",
title: "Shared Allowed Values",
definitions: {
routes: {
enum: ["R1", "R2", "R3"],
errorMessage: "Route must be a TOC-specified allowed value: R1, R2, R3"
}
}
};
```
Is there any way i could have all the enum values defined for routes inside my errorMessage? As i don't want to write all the enum values again and again. May be something like using a json pointer ${/definitions/routes/enum}
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Valutazione
Questa issue non è ancora stata valutata.