Commit d7994c8
committed
fix: allow NaN in schema describe() output validation
When a schema includes .allow(NaN), calling .describe() would throw a
ValidationError because NaN was not listed as a valid item type in the
internal manifest values schema.
NaN is a valid JavaScript number and a legitimate value to allow in a
joi schema. The fix adds NaN alongside the existing Infinity and
-Infinity exceptions in the internals.desc.values definition.
Fixes #30941 parent 481e270 commit d7994c8
2 files changed
Lines changed: 10 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
210 | 210 | | |
211 | 211 | | |
212 | 212 | | |
213 | | - | |
| 213 | + | |
214 | 214 | | |
215 | 215 | | |
216 | 216 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
254 | 254 | | |
255 | 255 | | |
256 | 256 | | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
257 | 266 | | |
258 | 267 | | |
259 | 268 | | |
| |||
0 commit comments