feat: 强化动态表单字段校验
This commit is contained in:
1 parent
ef0aa169a6
commit
d6c47ce143
7 files changed
+94
-4
No files matched your search
@@ -0,0 +1,12 @@
|
||||
# 表单配置校验收口
|
||||
|
||||
## 目标
|
||||
|
||||
把动态表单的字段定义变成可靠的 Runtime 合同:类型、key、label、required 和选项在 API 边界统一校验,错误在后台配置时明确反馈,不把坏配置发布到小程序。
|
||||
|
||||
## 验收
|
||||
|
||||
- 字段类型使用 allow-list。
|
||||
- `select`、`radio`、`multi-select` 的 options 结构经过运行时校验。
|
||||
- 重复 key、非法 key、空选项标签或值被拒绝。
|
||||
- API 测试覆盖成功和失败路径,前端构建及小程序 fixture 通过。
|
||||
@@ -0,0 +1,13 @@
|
||||
# 进度
|
||||
|
||||
- 任务:表单配置校验收口
|
||||
- 形态:epic
|
||||
- 进度:3/3
|
||||
- 当前:全部子任务完成
|
||||
- 真相文件:`SUBTASKS.csv`
|
||||
|
||||
## 验证
|
||||
|
||||
- API integration tests:26 passed。
|
||||
- Admin production build:通过。
|
||||
- Miniapp fixture 和 visual fixture:通过。
|
||||
@@ -0,0 +1,4 @@
|
||||
id,title,task_type,depends_on,status,task_dir,acceptance_criteria,validation_command,notes
|
||||
1,字段 schema 强化,single-full,,DONE,tasks/schema,validation package 拒绝非法字段定义,pnpm --filter @personal-brand/api test:integration,已完成
|
||||
2,后台错误反馈,single-full,1,DONE,tasks/schema,配置失败时保留输入并显示可读错误,pnpm --filter @personal-brand/admin build,已完成
|
||||
3,回归验证,single-full,2,DONE,tasks/regression,API 与 miniapp fixture 全通过,pnpm --filter @personal-brand/miniapp test:fixture && pnpm --filter @personal-brand/miniapp test:visual-fixture,已完成
|
||||
|
@@ -0,0 +1,8 @@
|
||||
# 回归验证
|
||||
|
||||
状态:DONE
|
||||
|
||||
- API 集成测试:26 passed。
|
||||
- Admin production build:通过。
|
||||
- Miniapp fixture:通过。
|
||||
- Miniapp visual fixture:通过。
|
||||
@@ -0,0 +1,7 @@
|
||||
# 字段 schema 强化
|
||||
|
||||
状态:DONE
|
||||
|
||||
- 字段 key、type、label、options 统一运行时校验。
|
||||
- 选择类字段必须配置非空 options。
|
||||
- 非法定义在 API 边界返回 400。
|
||||
Reference in new issue
Block a user