Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion Sources/ValidationKit/ValidationError.swift
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,11 @@
import Foundation

/// An error that occurs when input validation does not pass.
public struct ValidationError: Error, Equatable, Hashable {
public struct ValidationError: Error, LocalizedError, Equatable, Hashable {
public let localizedDescription: String
public var errorDescription: String? {
localizedDescription
}

public init(localizedDescription: String) {
self.localizedDescription = localizedDescription
Expand Down