josetorronteras / EmailValidationMacro

Swift macro framework for validating email addresses

Home Page:https://swiftpackageindex.com/josetorronteras/EmailValidationMacro

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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.

About

Swift macro framework for validating email addresses

https://swiftpackageindex.com/josetorronteras/EmailValidationMacro

License:MIT License


Languages

Language:Swift 100.0%