Skip to content

Latest commit

 

History

History
28 lines (18 loc) · 479 Bytes

File metadata and controls

28 lines (18 loc) · 479 Bytes

STRUCT

Validator

public struct Validator<T>

A validator for the given data type.

Methods

validate(_:)

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 always BasicValidationError.

Parameters

Name Description
data A data to be validated.