Skip to content

fix: validate email addresses with MailAddress - #37

Open
PeterKruithof wants to merge 1 commit into
masterfrom
fix/setup-email-validation
Open

fix: validate email addresses with MailAddress#37
PeterKruithof wants to merge 1 commit into
masterfrom
fix/setup-email-validation

Conversation

@PeterKruithof

Copy link
Copy Markdown
Collaborator

Summary

  • Replace weak Contains('@') email checks with System.Net.Mail.MailAddress validation — closes Setup wizard accepts invalid email addresses #18
  • Extract ValidationUtils.IsValidEmail() to JunoBank.Application/Utils/ (used in 3 places)
  • Updated: SetupStep1.razor, SetupStep2.razor, ForgotPassword.razor

Test plan

  • dotnet build — 0 errors
  • dotnet test — 160 tests pass
  • Verify invalid emails (e.g., foo@, @bar.com, no spaces@test.com) are rejected in setup wizard and forgot password

🤖 Generated with Claude Code

Replace weak Contains('@') checks in SetupStep1, SetupStep2, and
ForgotPassword with proper MailAddress validation. Extract shared
IsValidEmail to Application/Utils/ValidationUtils.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown

🧬 Mutation Testing

Metric Value
Score 54.79% 📈 (+6.84% vs baseline)
Killed 347
Survived 160
No Coverage 128
Timeout 2
What does this mean?

Stryker mutates your code (flips conditions, removes lines, changes values) and runs tests against each mutation. Killed = tests caught it (good). Survived = tests missed it (weak spot). No Coverage = no test touches this code.

Download the full HTML report from the Artifacts section below for per-file details.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Setup wizard accepts invalid email addresses

1 participant