Email Validation in Swift.

static func isValidEmail(_ emailString:String) -> Bool {let emailRegEx = "[A-Z0-9a-z._%+-]+@[A-Za-z0-9.-]+\\.[A-Za-z]{2,64}"let emailTest = NSPredicate(format:"SELF MATCHES %@", emailRegEx)return emailTest.evaluate(with: emailString)}




iOS Developer

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Create a Voice Changing Video Call App with SwiftUI

How to Create a Bunch of Copies of an Object in SwiftUI!

PRISM v1.1.2 — Major Improvements

SwiftUI Tutorial: Working with Form

5 Must have iOS14 Homescreen Widgets (January 2021)

Sign in With Apple Using Firebase Auth SDK and SwiftUI 2


Best Video Downloading app for iPhone and iPad — 2020

How to add CoreHaptics to your iOS app

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Ronak Patel

Ronak Patel

iOS Developer

More from Medium

Singleton Design Pattern in Swift

Macbook with some code on the screen

[LeetCode] 2185. Counting Words With a Given Prefix (Swift)

Swift: easy way to add tap gesture on a View

Xcode-How to change the main Storyboard