Swiftpack.co - Package - bdolewski/SwiftEmailValidator

SwiftEmailValidator

Very small e-mail validation helper written in Swift. It contains regular expresion that is compliant with RFC 5322. You can use it via Swift Package Manager or just copy file SwiftEmailValidator.swift into your project - done!

How do I use it in my code?

Simple as this:

let result = EmailValidator.isValid(email: "john.appleseed@apple.com")

There is only 1 static function isValid(email:) enclosed in namespace EmailValidator (just a case-less enum to not create any instances of EmailValidator)

Github

link
Stars: 3
Help us keep the lights on

Dependencies

Used By

Total: 0

Releases

v1.2.1 - Sep 27, 2019

  • fixed issue with downloading package directly from Xcode 11

v1.2.0 - Sep 22, 2019

Now creating instances of EmailValidator is impossible by switching from struct to enum with no cases.

v1.1.0 - Sep 22, 2019

Updated regular expression to match official one from RFC 5322

v1.0.0 - Sep 20, 2019

Added validation for e-mail address compliant with RFC 2822. Added support for Swift Package Manager