Skip to content

josetorronteras/EmailValidationMacro

Repository files navigation

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

let invalidEmail = #email("[email protected]") // ❌

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.