Skip to content

ValidationError

mattpolzin edited this page Jun 11, 2021 · 3 revisions

ValidationError

Validation errors are just a textual reason for validation failure and a coding path where the validation error occurred.

public struct ValidationError: Swift.Error, CustomStringConvertible 

Inheritance

CustomStringConvertible, Swift.Error

Initializers

init(reason:at:)

Create a new ValidationError with the given reason and location (coding path).

public init(reason: String, at path: [CodingKey]) 

Properties

reason

The reason for the validation failure.

public let reason: String

codingPath

The location where the failure occurred.

public let codingPath: [CodingKey]

codingPathString

A string representation of the whole coding path.

public var codingPathString: String 

description

public var description: String 
Types
Protocols
Global Functions
Extensions
Clone this wiki locally