Skip to content
pubscout

email_validator

3.0.0, released 2 years ago by an unverified publisher

A simple Dart class for validating email addresses without using RegEx.

WASM-ready
$ flutter pub add email_validator
Source repository

What it does

Validates the syntax of email addresses using a Dart class with a static validate method. It does not look up domains or check if an email actually exists.

AI-written summary of version 3.0.0, based on the package's README and metadata. Report an inaccuracy

Use it when

  • You need to validate email address syntax in Dart or Flutter applications
  • You want to avoid complex regular expressions for email validation

Skip it when

  • You need to verify if an email domain exists or if the mailbox is real
  • You need UI widgets for entering pins or handling other types of inputs

Strengths

  • Simple and lightweight with no external dependencies
  • Works across multiple platforms including Android, iOS, Web, Windows, macOS, and Linux

Weaknesses

  • Only validates syntax and does not check domain existence or mailbox validity

Setup

Kind
Pure Dart
Effort
Low
Code generation
No
Direct dependencies
0
void main() {
    var email = "fredrik@gmail.com";
    assert(EmailValidator.validate(email));
}

Alternatives

Packages that do the same job and could replace email_validator.

  • zod_validation

    Data validation library for Flutter forms and Shelf backend requests.

  • fzregex

    A regex validation library for common user input, identifiers, media formats, and financial data.

Works with

Packages commonly used together with email_validator: ones it builds on, ones built on it, and its own family.