Your Web News in One Place

Help Webnuz

Referal links:

Sign up for GreenGeeks web hosting
May 27, 2021 12:30 pm GMT

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 weeks 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. Well 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 its 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 apps user experience, its also much better to help your user when theyve 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 for free:

https://betterprogramming.pub/how-to-validate-emails-in-flutter-957ae75926c9?sk=8cd64b19f4f1eb8bba3ac297cb78e8dd


Original Link: https://dev.to/lucianojung/email-validation-made-simple-in-flutter-5hjh

Share this article:    Share on Facebook
View Full Article

Dev To

An online community for sharing and discovering great ideas, having debates, and making friends

More About this Source Visit Dev To