Validation Builder
class ValidationBuilder
A builder for creating PaymentCardNumberRules.
Functions
Link copied to clipboard
Builds the validation rule.
Link copied to clipboard
fun setAlgorithm(algorithm: ChecksumAlgorithm, errorMsg: String = CheckSumValidator.DEFAULT_ERROR_MSG): PaymentCardNumberRule.ValidationBuilder
Sets the checksum algorithm for validation.
Link copied to clipboard
Sets the maximum allowable length.
Link copied to clipboard
Sets the minimum allowable length.
Link copied to clipboard
fun setAllowableNumberLength(length: IntArray, errorMsg: String = LengthMatchValidator.DEFAULT_ERROR_MSG): PaymentCardNumberRule.ValidationBuilder
Sets the allowable lengths.
Link copied to clipboard
fun setAllowToOverrideDefaultValidation(canOverride: Boolean): PaymentCardNumberRule.ValidationBuilder
Sets whether to override the default validation rules.
Link copied to clipboard
fun setRegex(regex: String, errorMsg: String = RegexValidator.DEFAULT_ERROR_MSG): PaymentCardNumberRule.ValidationBuilder
Sets the regex for validation.