ajv-validator / ajv-validator/ajv

Better error messaging for NOT

オープン
#2,255 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る
enhancement
主要言語
TypeScript
スター
14.8k
フォーク
1k
PR マージ指標
30日以内にマージされた PR はありません

説明

**What version of Ajv you are you using?**
8.11.0

**What problem do you want to solve?**
I have a schema with a `not` clause which, on failure, returns a very unhelpful/confusing message: `my-schema.json/thing must NOT be valid`

```json
"thing": {
"type": "number",
"not": {
"exclusiveMinimum": -0.25,
"exclusiveMaximum": 0.25
}
}
```

**What do you think is the correct solution to problem?**
I think the correct messaging would be something along the line of what it would say if the criteria was not wrapped in a `not`. Something like:
```
my-schema.json/thing must NOT be < 0.25, my-schema.json/thing must NOT be > -0.25
```

**Will you be able to implement it?**
Unsure

コントリビューションガイド

コントリビューションガイドを開く

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。