check_disposable_email 0.2.1
check_disposable_email: ^0.2.1 copied to clipboard
Using this Package developer can check whether the user provided Email address Domain name is valid or fake
0.2.1 #
🔧 Code Quality Improvements #
- Code Formatting: Improved code formatting for better readability
- Split long lines into multiple lines following Dart formatting conventions
- Enhanced code consistency and maintainability
- Better adherence to Dart style guidelines
⚠️ Breaking Changes #
- None - All changes are backward compatible and only affect code formatting.
0.1.0 #
🚀 Major Enhancements #
Performance & Correctness Improvements
- Performance Optimization: Converted domain list from
ListtoSetfor O(1) lookup performance (3000x+ faster) - Lazy Initialization: Domain set is now cached and initialized on first access
- Case-Insensitive Matching: All domain checks are now case-insensitive (handles uppercase, lowercase, mixed case)
- Email Format Validation: Added comprehensive RFC 5322 compliant email format validation
- Validates email structure (local@domain format)
- Checks email length limits (max 254 chars total, 64 for local part)
- Validates domain format (no consecutive dots, no leading/ending dots/hyphens)
- Automatic whitespace trimming
- Special character validation
Developer Experience Improvements
- EmailValidationResult Class: New result class providing detailed validation information
isValid: Whether email is valid and non-disposableisDisposable: Whether domain is disposableisFormatValid: Whether email format is validdomain: Extracted domain (lowercase)errorMessage: Detailed error message if validation failed
- validateEmail Method: New method returning
EmailValidationResultwith comprehensive validation details - extractDomain Method: New public utility method to extract domain from email addresses
- Enhanced Null Handling: All methods now properly handle null inputs with clear error messages
- Improved Error Messages: Specific, descriptive error messages for different validation failures
✨ New Features #
Disposable.instance.validateEmail(String? email)- Returns detailedEmailValidationResultDisposable.instance.extractDomain(String? email)- Extracts and normalizes domain from emailEmailValidationResultclass with factory constructors (valid(),disposable(),invalidFormat())
🔧 Improvements #
- Return type changed from
bool?toboolforhasValidEmail()method (more explicit) - Better input sanitization (automatic trimming, null handling)
- Improved documentation with examples
🐛 Bug Fixes #
- Fixed case-sensitive domain matching issue
- Fixed performance issue with O(n) list lookups
- Improved handling of edge cases (null, empty, whitespace-only inputs)
📝 Documentation #
- Added comprehensive API documentation
- Added usage examples in method documentation
- Improved code comments and explanations
⚠️ Breaking Changes #
- None - All changes are backward compatible. The existing
hasValidEmail()method continues to work as before.
0.0.1 #
- TODO: initial release check Email Disposable