ajv-validator / ajv-validator/ajv

Catch Enum Errors value

未關閉
#2,475 4 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視
bug report missing info
主要語言
TypeScript
星號
14.8k
分支
1k
PR 合併指標
30 天內沒有已合併 PR

描述

Hello , I m using AJV Compiler to validate JSON Data against a defined Schemas , and I m using Literal or Enum to allow only a specific Values :
```
comparator:
"strictly-greater" | "strictly-lower" | "greater-or-equal" |"lower-or-equal" ;
```
However , during validation the compiler doesn't show all allowed values , it only shows :

```
message: "must be equal to constant"
​​
params: Object { allowedValue: "strictly-greater" }
```
Can anyone assist on that , is it related to my validation logic or the AJV Compiler does catch errros for enum or literal values only for the first value ?!

貢獻指南

開啟貢獻指南

評估

這個 Issue 還沒有評估資料。

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。