Validation Builder
class ValidationBuilder
This class provides an API for set up rules for validation unknown bank card brands.
It is recommended if you may have a lot of local or special brands in you system.
Functions
Link copied to clipboard
Creates a rule.
Link copied to clipboard
fun setAlgorithm(algorithm: ChecksumAlgorithm, errorMsg: String = CheckSumValidator.DEFAULT_ERROR_MSG): PaymentCardNumberRule.ValidationBuilder
Configure behavior for validation checkSum.
Link copied to clipboard
Configure maximum length which will support.
Link copied to clipboard
Configure minimum length which will support.
Link copied to clipboard
fun setAllowableNumberLength(length: IntArray, errorMsg: String = LengthMatchValidator.DEFAULT_ERROR_MSG): PaymentCardNumberRule.ValidationBuilder
Configure the array of lengths which will support.
Link copied to clipboard
fun setAllowToOverrideDefaultValidation(canOverride: Boolean): PaymentCardNumberRule.ValidationBuilder
Determines whether the Collect SDK can override default validation rules.
Link copied to clipboard
fun setRegex(regex: String, errorMsg: String = RegexValidator.DEFAULT_ERROR_MSG): PaymentCardNumberRule.ValidationBuilder
Configure regex for validation input.