PatternParsingError

public enum PatternParsingError : Error, Equatable

An error that can be thrown when constructing a Pattern instance.

A valid pattern string includes at least one alphabetic character, at least one digit, and an optional period at the beginning or the end (but not both). No two consecutive characters may be digits, and the string may not contain any other type of character.

  • A pattern string which did not contain at least one letter and one digit from between 1 and 9, inclusive.

    Declaration

    Swift

    case deficientPattern(String)
  • A pattern string which contained a character that was not alphabetic, a digit 1-9, or a period.

    Declaration

    Swift

    case invalidCharacter(String)
  • A pattern string which contained multiple consecutive digits.

    Declaration

    Swift

    case consecutiveDigits(String)