首页 > 解决方案 > 超过 joi.string().base64() 的最大调用堆栈大小

问题描述

我收到下一个错误:

node_modules/joi/lib/types/string/index.js:464
            if (regex.test(value)) {
                      ^

RangeError: Maximum call stack size exceeded
    at RegExp.test (<anonymous>)

对于代码:

 const res = validate({ body: request }, {
    body: joi.object({
    image: joi.string().base64() // image base64 size in near 4MB

如何解决此限制错误?

标签: javascriptnode.jsjoi

解决方案


推荐阅读