LengthValidator

open class LengthValidator : Validator

A generic validator that validates the length of a string.

  • The minimum length of the string.

    Declaration

    Swift

    public let minimumLength: Int?
  • The maximum length of the string.

    Declaration

    Swift

    public let maximumLength: Int?
  • Initializes the length validator.

    Declaration

    Swift

    public init(minimumLength: Int? = nil, maximumLength: Int? = nil)

    Parameters

    minimumLength

    The minimum length of the string.

    maximumLength

    The maximum length of the string.