提问人:Marius spielt live 提问时间:11/17/2023 更新时间:11/17/2023 访问量:14
如何检查字段是否未在 EJS 中填写
how to check if an field is not filled out in ejs
问:
https://pastebin.com/GxNe01LB
错误:
Error updating welcome channel: CastError: Cast to string failed for value "[ '', '' ]" (type Array) at path "welcomeChannel" at SchemaString.cast (C:\Users\mariu\Desktop\moxx handler\node_modules\mongoose\lib\schema\string.js:606:11) at SchemaType.applySetters (C:\Users\mariu\Desktop\moxx handler\node_modules\mongoose\lib\schematype.js:1219:12) at SchemaString.castForQuery (C:\Users\mariu\Desktop\moxx handler\node_modules\mongoose\lib\schema\string.js:690:15) at castUpdateVal (C:\Users\mariu\Desktop\moxx handler\node_modules\mongoose\lib\helpers\query\castUpdate.js:576:19) at walkUpdatePath (C:\Users\mariu\Desktop\moxx handler\node_modules\mongoose\lib\helpers\query\castUpdate.js:381:24) at castUpdate (C:\Users\mariu\Desktop\moxx handler\node_modules\mongoose\lib\helpers\query\castUpdate.js:110:7) at model.Query._castUpdate (C:\Users\mariu\Desktop\moxx handler\node_modules\mongoose\lib\query.js:4709:10) at model.Query._updateThunk (C:\Users\mariu\Desktop\moxx handler\node_modules\mongoose\lib\query.js:3876:25) at model.Query._updateOne (C:\Users\mariu\Desktop\moxx handler\node_modules\mongoose\lib\query.js:3964:23) at model.Query.exec (C:\Users\mariu\Desktop\moxx handler\node_modules\mongoose\lib\query.js:4429:28) { stringValue:
“[ '', '' ]”ay'
}, messageFormat: undefined, kind: 'string', value: [ '', '' ], path: 'welcomeChannel', reason: null, valueType: 'Arr
我试图检查该字段是否已归档,但我不知道如何,因为它不起作用
答: 暂无答案
评论