Skip to content

bdolewski/SwiftEmailValidator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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)