email_sanity 0.1.0 copy "email_sanity: ^0.1.0" to clipboard
email_sanity: ^0.1.0 copied to clipboard

A Flutter package for enhanced email validation with additional layers of accuracy and reliability.

Email Sanity #

A robust Flutter package designed to provide enhanced email validation with additional layers of accuracy and reliability. Building on the foundation of the popular email_validator package, EmailSanity introduces extra "magic" to ensure that the emails you process are not just syntactically correct, but also contextually appropriate and ready for real-world use.

It validates the email syntax and checks as well as the domains to ensure the email provided is accurate.

Email Providers Being Checked:

  1. Google
  2. Yahoo
  3. Microsoft
  4. Apple
  5. Yandex
  6. Fastmail
Email Sanity Preview

Installation #

1. Add Package #

Add this to your package's pubspec.yaml file:

dependencies:
  email_sanity: '^1.0.0'

2. Run Pub Get

$ pub get
..

3. Import Email Sanity

import 'package:email_sanity/email_sanity.dart';

Usage #

Basic Validation #

void main() {
    var email = "email@gmail.com";
    assert(EmailSanity.validate(email));
}

Validation with Details #

void main() {
    var email = "email@gmail.com";
    var result = EmailSanity.validateWithDetails(email);
    print('Is valid: ${result.isValid}');
    print('Error message: ${result.errorMessage}');
}
0
likes
140
points
18
downloads

Publisher

unverified uploader

Weekly Downloads

A Flutter package for enhanced email validation with additional layers of accuracy and reliability.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

email_validator, flutter

More

Packages that depend on email_sanity