Skip to content

Latest commit

 

History

History
12 lines (9 loc) · 549 Bytes

README.md

File metadata and controls

12 lines (9 loc) · 549 Bytes

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: "[email protected]")

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