Result
public enum Result
Represents the result of the validation performed by a validating property.
-
The proposed value is valid.
Declaration
Swift
case valid(Value) -
The proposed value is invalid, but the validator was able to coerce it into a replacement which it deemed valid.
Declaration
Swift
case coerced(replacement: Value, proposed: Value, error: ValidationError?) -
The proposed value is invalid.
Declaration
Swift
case invalid(Value, ValidationError) -
Whether the value is invalid.
Declaration
Swift
public var isInvalid: Bool { get } -
Extract the valid value, or
nilif the value is invalid.Declaration
Swift
public var value: Value? { get } -
Extract the error if the value is invalid.
Declaration
Swift
public var error: ValidationError? { get }
View on GitHub
Install in Dash
Result Enumeration Reference