ConstraintViolation

public struct ConstraintViolation : LocalizedError

A common error type to throw by ConstraintValidator for an invalid value.

  • A custom error message.

    Declaration

    Swift

    public let message: String
  • See LocalizedError.

    Declaration

    Swift

    public var errorDescription: String? { get }
  • Initializes a new instance with a custom error message.

    Declaration

    Swift

    public init(_ message: String)

    Parameters

    message

    A custom error message.