Files
Nexus/docs/changelog/2026-06-08-validation-error-loc-zh.md
T
Nexus Agent 091fb97291
Nexus CI/CD / test (push) Waiting to run
Nexus CI/CD / deploy (push) Blocked by required conditions
Nexus Pre-commit Checks / quick-check (push) Waiting to run
Push async submit, Chinese 422 field labels, hide server CSV export.
Return sync/files immediately with background runner; show loc_zh in validation errors; remove servers toolbar CSV export button.
2026-06-08 23:28:26 +08:00

741 B
Raw Blame History

2026-06-08 — 422 校验错误字段名中文化

变更摘要

API 422 响应增加 loc_zh(如「每页条数」),前端不再显示 query.per_page: 不能大于 200 这类英文路径前缀。

动机

用户看到半英文校验提示;根因是 msg 已翻译但 loc 仍拼接 query. 前缀。

涉及文件

  • server/utils/validation_errors_zh.py
  • frontend/src/utils/validationErrorFormat.ts(新)
  • frontend/src/api/index.tsfrontend/src/utils/apiError.ts
  • frontend/src/pages/ServersPage.vue — CSV 导出改为分页拉取(避免 per_page: 5000 触发 422

验证

pytest tests/test_validation_errors_zh.py -q

用户可见示例:每页条数:不能大于 200