Nobody has started this yet — be first.
Business impact
The registration email format check is supposed to require a real domain with a dot in it (user@example.com). Right now it accepts garbage like user@localhost or user@nodotatall as a "valid" email -- letting obviously-malformed addresses into the system, which in a real deployment means bounced verification emails, unreachable accounts, and bad data quality that downstream features (password reset, receipts, notifications) all have to deal with.
Problem
The email-validation regex is meant to require a literal "." between the "@" and the end of the string, but the dot in the pattern is unescaped -- in regex, an unescaped "." matches any single character, not specifically a literal dot -- so the "must contain a dot" requirement is effectively gone; almost any non-empty string of the right shape after the "@" satisfies it.
Current behavior
Registering with an email that has no dot at all in its domain (e.g. user@localhost) succeeds with 201 instead of being rejected.
Expected behavior
emailRe requires an actual literal "." between the "@" and the final segment, rejecting addresses with none.
Steps to reproduce
curl -s -X POST http://localhost:8082/register -H 'Content-Type: application/json'
-d '{"email":"user@localhost","password":"correct-horse-battery"}'
Why this matters
This is a classic "unescaped regex metacharacter" mistake -- "." unescaped means "any character," so a pattern meant to enforce a literal dot silently stops enforcing it, while still compiling as a perfectly valid regex with no error of any kind.
Suggested approach
Look at emailRe's pattern character by character around the segment that's supposed to require a domain suffix, and compare it against how the same character is escaped everywhere else a literal dot is meant, versus where it isn't.
Acceptance criteria
Verification
go test ./practicetickets/... -run TestTicket03 -v
Hints (0/2)
Try it without hints first — the reading is the exercise.
Working on this ticket
Work on a branch named for the ticket — that's what you'll submit.
Branch off your fork
$git checkout -b fix/email-regex-unescaped-dotFix it and commit
Meet every acceptance criterion, and add a test that would have caught this.
Push the branch
$git push -u origin fix/email-regex-unescaped-dotSubmit it below
Paste your fork URL and the branch name, with a short write-up of the root cause.
Questions
Ask about anything unclear in the ticket — the maintainer and anyone who has solved it can answer. Please don't post full solutions.
Sign in to ask a question or reply.
Sign indocker-compose.ymlmigrations/0001_init.sqldocker-entrypoint-initdb.dexpense_trackerdbappcurl http://localhost:8082/healthz
To run locally against your own Postgres instead: cp .env.example .env (edit if your Postgres isn't on localhost:5434), then make migrate (applies migrations/*.sql via psql) and make run (go run ./cmd/server).
Work the tickets in PRACTICE_TICKETS.md (TICKET-01 through TICKET-10); each names one Go test in practicetickets/:
go test ./practicetickets/... -run TestTicket01 -v # a single ticket
./practice_tickets_run.sh # all 10, clean pass/fail summary
This project's own integration suite (cmd/server/*_test.go) needs a real, reachable Postgres -- point TEST_DATABASE_URL at any empty/disposable database (migrations are applied automatically, and every test truncates+reseeds before it runs) and run make test. The practicetickets/ suite defaults to postgres://postgres:postgres@localhost:5434/expense_tracker_test if TEST_DATABASE_URL is unset.
Level 1
Fix a bug
Read existing behaviour, correct it.