Skip to content

Latest commit

 

History

History
56 lines (38 loc) · 1.95 KB

README.md

File metadata and controls

56 lines (38 loc) · 1.95 KB

Email Validation Macro

CodeFactor testing Coverage Status

Email Validation Macro is a Swift macro framework for validating email addresses.

Basic Usage

// Create and validate an email address
let validEmail = #email("foo@email.com")

let invalidEmail = #email("foo@.com") // ❌

Installation

Swift Package Manager

Add the following line to the dependencies in Package.swift:

.package(
    url: "https://github.com/josetorronteras/EmailValidationMacro",
    from: "1.0.0"
),

Then add EmailValidationMacro to your target's dependencies:

.product(
    name: "EmailValidation",
    package: "EmailValidationMacro"
),

Xcode

Go to File > Add Package Dependencies... and paste the repo's URL:

https://github.com/josetorronteras/EmailValidationMacro

License

This library is relased under the MIT license. See LICENSE for details.