ValidationError

public struct ValidationError : Error, CustomStringConvertible

ValidationError represents the error with message when validation fails.

  • Validatible responsible for the error

    Declaration

    Swift

    public var validatable: NamedValidatable
  • Initializes a ValidationError object with message String.

    Declaration

    Swift

    public init(_ message: String, for validatable: NamedValidatable)

    Parameters

    message

    String that holds error message.

    for

    Validatable responsible for the error.

    Return Value

    An initialized object.

  • Error Description

    Declaration

    Swift

    public var description: String { get }