STRUCT
public struct Validator<T>
A validator for the given data type.
public func validate(_ data: T) throws
Validates the given data against validator.
-
Parameter data: A data to be validated.
-
Throws: Error thrown by the
validator
. For default validators it is alwaysBasicValidationError
.
Name | Description |
---|---|
data | A data to be validated. |