talira

email_validator

Email address syntax validation for Dart and Flutter, without regular expressions

open sourceMITfree

email_validator is a small Dart class that checks whether a string is a syntactically valid email address, without using regular expressions. It works in Dart and in Flutter apps. It only checks the syntax: it doesn't look up the domain or check that the address exists.

Problems it solves

  • check that an email address a user typed into my Flutter form is well formed
  • validate email input in my Dart app without writing a fragile regex
  • reject obviously malformed email addresses before sending a sign-up request

Features

  • EmailValidator.validate() for email address syntax
  • no regular expressions
  • usable in Flutter apps

Limitations

  • Checks only an address's syntax: it doesn't look up the domain or check that the mailbox exists.1