Thank you for your interest in contributing! This document explains how to set up the project locally, run tests, and submit a pull request.
You'll need the Dart SDK installed.
# Install dependencies
dart pub getdart testOr to run the single test file directly:
dart test test/email_validator_test.dart# Run the static analyser (must pass with no errors or warnings)
dart analyze --fatal-infos
# Check formatting (must pass before merging)
dart format --output=none --set-exit-if-changed .
# Auto-fix formatting
dart format .lib/email_validator.dart # Single-file library — all parsing logic lives here
test/email_validator_test.dart # All tests; valid/invalid/international address lists
example/example.dart # Short usage example
The parser is cursor-based: a shared _index field advances through the email string inside the EmailValidator class. There are no external dependencies. Please keep it that way — no new dependencies without a prior discussion in an issue.
- Fork the repository and create a branch from
master. - Make your changes. For bug fixes, add a regression test that fails before your fix and passes after.
- Ensure
dart analyze --fatal-infosanddart format --output=none --set-exit-if-changed .both pass. - Run
dart testand confirm all tests pass. - Open a pull request with a clear description of the problem and solution.
Please open a GitHub issue with:
- The email address that produces the unexpected result.
- The expected outcome (valid/invalid) and the actual outcome.
- The package version you are using.