ValidationType

public enum ValidationType

Enum to determine the password type.

Subspec: Validation/ValidationType

  • lowercasedLetters
  • uppercasedLetters
  • specialCharacters
  • numbers
  • minCharacters
  • Password contains lowercased letters.

    Declaration

    Swift

    case lowercasedLetters(count: Int)
  • Password contains uppercased letters.

    Declaration

    Swift

    case uppercasedLetters(count: Int)
  • Password contains numbers.

    Declaration

    Swift

    case numbers(count: Int)
  • Password contains special characters.

    Declaration

    Swift

    case specialCharacters(count: Int)
  • Password minimun characters

    Declaration

    Swift

    case minCharacters(count: Int)
  • Declaration

    Swift

    internal static func getRegexCode(with validators: [ValidationType]) -> String

    Parameters

    validators

    Validation types required.

    minCharacters

    The minimum characters for the given password.

    Return Value

    Regex code.

  • Declaration

    Swift

    private static func generateRegex(from code: String, and count: Int) -> String

    Parameters

    code

    The regex code for the Validation type.

    minCharacters

    The count to construct the corresponding regex code.

    Return Value

    Regex code.