[Onboarding + Enrollments] Display-name validator only
@tanggiabao172007 已经在做这个了。
开始于 2026年10月12日。
评估
- 难度
- 2/5
- 预计耗时
- 1-3 小时
- 新手友好度
- 88/100
调研方向
阅读 supabase/schemas/dogpack/tables/profiles.sql 以了解个人资料限制,并阅读 supabase/schemas/dogpack/types/ 中的 enum 以了解有效的年级。实现在 lib/onboarding/profile_validators.dart 中的三个纯 Dart 验证器,并在 test/profile_validators_test.dart 中覆盖指定的边界和 enum 值。当指定测试 flutter test test/profile_validators_test.dart 通过且提示消息符合验收标准时,即为完成。
由索引模型根据 Issue 内容生成。
描述
What to build
Check the display name entered during first-time setup. Reject blank names and names outside the allowed length, returning a short message that can be shown beside the field.
Files
lib/onboarding/profile_validators.dart(new file)- Starting example: supabase/schemas/dogpack/tables/profiles.sql
Code to add or extend:String? validateDisplayName(String? input).
Steps
- Remove spaces at the start/end with input?.trim(), treating null as empty. Accept lengths from 1 through 60.
- Return null for an accepted name. Otherwise return “Enter a display name of 1–60 characters.” Keep this file independent of Flutter screens and database calls.
- Check null, spaces only, and names of 1, 60 and 61 characters.
Example
Padded valid input → null; whitespace → error;61 characters → error.
Check it works
In test/onboarding/profile_validators_8_test.dart, check the example above and the failure or limit described in the steps. Run flutter test test/onboarding/profile_validators_8_test.dart and flutter analyze.
References
Assign yourself before starting, or comment to claim the issue. Project setup.
If you have already started, keep equivalent working code names and coordinate any shared-file changes with the dependent contributors.
- 主要语言
- PLpgSQL
- 星标
- 0
- 派生
- 0
- PR 合并指标
- 30 天内没有已合并 PR
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
DevDogsUGA/DogPack 的其他 Issue
-
polish
难度 2/5 1-3 小时 新手友好度 72/100
DevDogsUGA/DogPack#131 ·
-
polish
难度 2/5 1-3 小时 新手友好度 65/100
DevDogsUGA/DogPack#130 ·
-
moderation
难度 2/5 1-3 小时 新手友好度 75/100
DevDogsUGA/DogPack#119 ·
-
moderation
难度 2/5 1-3 小时 新手友好度 85/100
DevDogsUGA/DogPack#113 ·
-
discover
难度 2/5 1-3 小时 新手友好度 74/100
DevDogsUGA/DogPack#106 ·
查看 DevDogsUGA/DogPack 的全部 Issue
相似的 Issue
-
bug
难度 2/5 1-3 小时 新手友好度 85/100
juice-shop/juice-shop#3686 ·
维护者通常 1 天内回复
-
perf(translator): Claude→Responses stream re-validates the whole request body on every SSE chunk未关闭
难度 2/5 1-3 小时 新手友好度 72/100
router-for-me/CLIProxyAPI#6665 ·
维护者通常 1 天内回复
-
[Issue]: hipsparselt.h C API as shipped now requires C23 -- ONLY because of missing include or guard未关闭
难度 2/5 1-3 小时 新手友好度 62/100
ROCm/rocm-libraries#13736 ·
维护者通常 2 天内回复
-
难度 2/5 1-3 小时 新手友好度 65/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 72/100