feat: 上架视频剪辑固定材料与作者契约

This commit is contained in:
yige committed 2026-11-02 21:52:36 +08:00
1 parent 9577e9a411
commit eef65008eb
18 files changed
+5658 -198

No files matched your search

+7
View File
@@ -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)) {