mirror of
https://git.openapi.site/https://github.com/desirecore/registry.git
synced 2026-12-06 03:39:05 +08:00
feat: 上架视频剪辑固定材料与作者契约
This commit is contained in:
1 parent
9577e9a411
commit
eef65008eb
18 files changed
+5658
-198
No files matched your search
@@ -141,6 +141,13 @@ function validateNode(value, schema, rootSchema, path, errors) {
|
||||
if (schema.items) {
|
||||
value.forEach((item, index) => validateNode(item, schema.items, rootSchema, joinPath(path, index), errors))
|
||||
}
|
||||
if (schema.contains !== undefined && !value.some((item, index) => {
|
||||
const candidateErrors = []
|
||||
validateNode(item, schema.contains, rootSchema, joinPath(path, index), candidateErrors)
|
||||
return candidateErrors.length === 0
|
||||
})) {
|
||||
errors.push({ path, message: '数组必须包含符合 contains 的元素' })
|
||||
}
|
||||
}
|
||||
|
||||
if (value !== null && typeof value === 'object' && !Array.isArray(value)) {
|
||||
|
||||
Reference in new issue
Block a user