Swiftpack.co - Package - quver/VATIdValidator

VATIdValidator

CI GitHub license Swift Package Manager compatible codebeat badge codecov Readme Score Documentation

Polish VAT Identification (NIP) number validator.

API

Initialisation

VATIdValidator([Int])
VATIdValidator(BinaryInteger)
VATIdValidator(Double)
VATIdValidator(StringLiteralType)

Validation

let validator = VATIdValidator(5260250274)
try validator.validate()

Extensions

  • BinaryInteger
  • Double
  • StringLiteralType
var isValidVATId: Bool { get }

Example

if 5260250274.isValidVATId {
	// Do the magic 🎊
}

if "5260250274".isValidVATId {
	// Other magic 🎉
}

Using

Swift Package Manager

The Swift Package Manager is dependency manager built by Apple and integrated with Xcode and into swift compiler.

Add to your Package.swift:

dependencies: [
    .package(url: "https://github.com/quver/VATIdValidator.git", .upToNextMajor(from: "1.0.0"))
]

Cocoapods

The Cocoapods is a dependency manager for Swift and Objective-C. Supports iOS, watchOS, tvOS and macOS.

Add to your Podfile:

pod 'VATIdValidator'

Than run:

pod install

Github

link
Stars: 1

Dependencies

Used By

Total: 0

Releases

1.0.0 - 2020-03-27 17:23:33

Initial version