ValidationError
public enum ValidationError : Error, LocalizedError, Identifiable, Equatable, Sendable
An error type that represents validation errors.
-
A unique identifier for the error.
Declaration
Swift
public var id: UUID { get } -
Declaration
Swift
case required -
Declaration
Swift
case regexError(message: String) -
Declaration
Swift
case invalidLength(min: Int, max: Int) -
Declaration
Swift
case uniqueCharacter(min: Int) -
Declaration
Swift
case maxRepeat(max: Int) -
Declaration
Swift
case minCharacters(character: String, min: Int) -
A localized description of the error.
Declaration
Swift
public var errorDescription: String? { get } -
The error message for the validation error.
Declaration
Swift
public var errorMessage: String { get }
View on GitHub