首先在schema里设置了
"reserve_userID": {
"forceDefaultValue": {
"$env": "uid"
},
"foreignKey": "uni-id-users._id",
"permission": {
"read": true,
"create": true,
"update": false,
"delete": false
},
"description": "用户ID"
},
我在前端提交相应表单数据的时候发现并没有生成该字段以及默认uid,如果我在前端主动提交reserve_userID,还会报错:
Uncaught (in promise)P: [router]: ValidationFailed:errCode: ValidationFailed | errMsg: 参数校验错误: doc field should not contain illegal character
at Function.complete (http://localhost:8081/static/js/chunk-vendors.js:13065:6053)
at http://localhost:8081/static/js/chunk-vendors.js:708:86381
at Object.I [as callback] (http://localhost:8081/static/js/chunk-vendors.js:708:89543)
at b (http://localhost:8081/static/js/chunk-vendors.js:708:90065)
at XMLHttpRequest.k.onload (http://localhost:8081/static/js/chunk-vendors.js:708:56285)
1 个回复
DCloud_uniCloud_WYQ
看一下你的网络请求里面这个请求对应的请求体