DSMinMaxValidationRule

public struct DSMinMaxValidationRule : DSValidationRule

A validation rule for requiring that text is a number and is between a min and max value. (Inclusive.)

  • Initializes the validation rule.

    Declaration

    Swift

    public init(min: Int, max: Int, message: String)

    Parameters

    min

    The smallest number allowed for the field. (Inclusive)

    max

    The largest number allowed for the field. (Inclusive)

    message

    Error message to display if validator fails. Should include two %@ formatters for min and max.