Mercurial > prosody-hg
comparison util/jsonschema.lua @ 14186:d975d280baec
Merge 13.0->trunk
| author | Matthew Wild <mwild1@gmail.com> |
|---|---|
| date | Mon, 25 May 2026 19:01:23 +0100 |
| parents | b713da7527d2 94172bbf9074 |
| children |
comparison
equal
deleted
inserted
replaced
| 14168:4f4c346e4f39 | 14186:d975d280baec |
|---|---|
| 119 return false, errs | 119 return false, errs |
| 120 end | 120 end |
| 121 end | 121 end |
| 122 | 122 |
| 123 if type(data) == "number" then | 123 if type(data) == "number" then |
| 124 if schema.multipleOf and (data == 0 or data % schema.multipleOf ~= 0) then | 124 if schema.multipleOf and data ~= 0 and data % schema.multipleOf ~= 0 then |
| 125 table.insert(errs, mkerr(sloc .. "/luaPattern", iloc, "not a multiple")) | 125 table.insert(errs, mkerr(sloc .. "/luaPattern", iloc, "not a multiple")) |
| 126 return false, errs | 126 return false, errs |
| 127 end | 127 end |
| 128 | 128 |
| 129 if schema.maximum and not (data <= schema.maximum) then | 129 if schema.maximum and not (data <= schema.maximum) then |
