Skip to content

ValidationError

mattpolzin edited this page Oct 1, 2020 · 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.

let reason: String

codingPath

The location where the failure occurred.

let codingPath: [CodingKey]

codingPathString

A string representation of the whole coding path.

var codingPathString: String

description

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