Swiftpack.co -  Package - Q42/ValidationKit
Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.
Q42/ValidationKit
A Swift library for validating user input, for example in forms.
.package(url: "https://github.com/Q42/ValidationKit.git", from: "0.0.1")

ValidationKit

A Swift library for validating user input, for example in forms.

Usage

import ValidationKit

let titleValidator: Validator = .notEmpty && .maxLength(140)

switch titleValidator.validate(input: title) {
case .valid(let value):
  print("title \(value) is valid")
case .invalid(let error):
  print(String(format: "title: %@", error.localizedDescription)
}

Releases

  • 0.0.1 - 2021-03-28 - Initial public release
  • 0.0.0 - 2019-12-02 - Initial private version for a project at Q42

Licence & Credits

ValidationKit is written by Mathijs Bernson and Tim van Steenis.

It is available under the MIT license, so feel free to use it in commercial and non-commercial projects.

GitHub

link
Stars: 1
Last commit: 2 weeks ago

Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco