Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

[Onboarding + Enrollments] Canonical course-format validator only

未关闭 适合新手
#7 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
2/5
预计耗时
1-3 小时
新手友好度
91/100
Issue 类型
功能
描述清晰度
描述清楚
活跃度
活跃
技术栈
dart, flutter, supabase
领域
backend

调研方向

阅读 supabase/schemas/dogpack/tables/enrollments.sql 中的数据库约束,并按照 docs/getting-started/first-contribution.md 中的设置指南操作。在 lib/onboarding/course_code.dart 中添加纯 Dart 函数,并在 test/course_code_test.dart 中覆盖列出的情况和输出有效性。运行 flutter test test/course_code_test.dart;当 examples 和额外情况均通过,且每个规范化后的值都符合数据库正则表达式时,即表示完成。

由索引模型根据 Issue 内容生成。

描述

good first issue onboarding

What to build

Check whether a course code already matches DogPack’s required format, such as CSCI 1301. This helper only accepts or rejects the input; the following task handles friendlier typed spellings.

Files

Steps

  1. Add isValidCourseCode(input) using RegExp(r"^[A-Z]{4} [0-9]{4}[A-Z]?$").firstMatch(input).
  2. Accept only when match.start is 0 and match.end equals input.length. This prevents a trailing newline from being accepted as a complete match.
  3. Check CSCI 1301 and CSCI 1301L; reject lowercase, a trailing newline, the wrong number of letters/digits and extra text. This function checks the standard form without changing it.

Example

CSCI 1301/CSCI 1301L accepted; lowercase, trailing newline,3 letters,5 digits,extra text rejected.

Check it works

In test/onboarding/course_code_7_test.dart, check the example above and the failure or limit described in the steps. Run flutter test test/onboarding/course_code_7_test.dart and flutter analyze.

References

Assign yourself before starting, or comment to claim the issue. Project setup.

主要语言
PLpgSQL
星标
0
派生
0
PR 合并指标
30 天内没有已合并 PR

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

DevDogsUGA/DogPack 的其他 Issue

查看 DevDogsUGA/DogPack 的全部 Issue

相似的 Issue

更多 Backend & API Design Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。