flutter_email_validator 2.1.24 copy "flutter_email_validator: ^2.1.24" to clipboard
flutter_email_validator: ^2.1.24 copied to clipboard

A simple (but correct) dart class for validating email addresses

Email validator Build status pub package #

This is a updated fork of email_validator package. #

A simple Dart class for validating email addresses without using RegEx. Can also be used to validate emails within Flutter apps (see Flutter email validation).

NB: This library only validates the syntax of the email, not by looking up domain or whether an email actually exists.

Featured in:

  1. How To Validate Emails in Flutter by https://github.com/lucianojung
  2. Flutter Tutorial - Email Validation In 7 Minutes by https://github.com/JohannesMilke
  3. Flutter Tutorial - Email Validation | Package of the week by https://github.com/Dhanraj-FlutterDev

Found in several big libraries and apps:

  1. Google Firebase
  2. Supabase - Flutter auth UI
  3. TubeCards - The world’s best flashcard platform
  4. Serverpod - Serverpod is a next-generation app and web server, explicitly built for Flutter
  5. Ventyr.app - An app for last minute experiences - Startup from Tromsø, Norway

And many more!

Installation #

1. Depend on it #

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

dependencies:
    email_validator: '^2.1.24'

2. Install it

You can install packages from the command line:

$ pub get
..

Alternatively, your editor might support pub. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:

import 'package:email_validator/email_validator.dart';

Usage #

Read the unit tests under test, or see code example below:

void main() {

    var email = "ankit.k.j1999.com";

    assert(EmailValidator.validate(email));
}

Tips #

You can also use this repo as a template for creating Dart packages, just clone the repo and start hacking :)

2
likes
130
pub points
79%
popularity

Publisher

unverified uploader

A simple (but correct) dart class for validating email addresses

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (LICENSE)

More

Packages that depend on flutter_email_validator