All Versions
4
Latest Version
Avg Release Cycle
76 days
Latest Release
625 days ago

Changelog History

  • v0.0.4 Changes

    February 07, 2020

    ⚡️ Updated @Validated initializer to accept a initial value

  • v0.0.3 Changes

    September 26, 2019

    👌 Improved Package.swift

    ⚡️ Updated Swift toolchain to 5.0 and declared platforms

  • v0.0.2 Changes

    July 10, 2019

    🍱 Error Handling 🕵️‍♂️

    Each property that is declared with the @Validated attribute can make use of advanced functions and properties from the Validated Property Wrapper itself via the $ notation prefix.

    Beside doing a simple nil check on your @Validated property to ensure if the value is valid or not you can access the validatedValue or validationError property to retrieve the ValidationError or the valid value.

    @Validated(.nonEmpty)var username: String?// Switch on `validatedValue`switch $username.validatedValue {case .success(let value):// Value is valid ✅breakcase .failure(let validationError):// Value is invalid ⛔️break}// Or unwrap the `validationError`if let validationError = $username.validationError { // Value is invalid ⛔️} else { // Value is valid ✅}
    
  • v0.0.1 Changes

    June 25, 2019

    🚀 This is the initial release of ValidatedPropertyKit