DEV Community

Cover image for 🦋Email Validation made simple in Flutter
Luciano Jung
Luciano Jung

Posted on • Edited on

6 1

🦋Email Validation made simple in Flutter

Photo by inlytics | LinkedIn Analytics Tool on Unsplash

Welcome to my first article about Flutter package testing. Each week, I will test another package published under pub.dev.

Email Validator

This week’s package provides you with one easy-to-use function to validate an email input. The author mentions that this is a simple (but “correct”) Dart class for email validation without using regular expressions. We’ll come back later to why he calls it correct.

The Purpose

I think the purpose of this package is very clear. For example, if you want to register a user with an email address and a password, you have to verify that the email address is valid. If it’s not, you can give your user a hint that they have to check their email address again for any spelling mistakes. Not all backend systems support email validation while creating a new user. According to your app’s user experience, it’s also much better to help your user when they’ve finished the email address input and want to start filling in a password.
Most of the time, you start searching for an email validation right when you need it. Looking at Stack Overflow, the most upvoted response for this scenario is a complex regex.

Package Scope

...

Head over to Medium to read the whole post

Sentry mobile image

Is your mobile app slow? Improve performance with these key strategies.

Improve performance with key strategies like TTID/TTFD & app start analysis.

Read the blog post

Top comments (2)

Collapse
 
sloan profile image
Sloan the DEV Moderator
Comment hidden by post author
Collapse
 
pablonax profile image
Pablo Discobar
Comment hidden by post author

Some comments have been hidden by the post's author - find out more

Heroku

Build apps, not infrastructure.

Dealing with servers, hardware, and infrastructure can take up your valuable time. Discover the benefits of Heroku, the PaaS of choice for developers since 2007.

Visit Site

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay