Vgs Card Brand
Describes a payment card brand and the rules used to recognise and validate it.
The card-number field auto-detects the brand from the current input against the brands it was created with (see supportedCardBrands on com.verygoodsecurity.vgscollect.widget.compose.state.VgsCardNumberTextFieldState). The detected brand is exposed as cardBrand on the state so the UI can react — e.g. by drawing cardIcon in a trailingIcon.
Use DEFAULT for the built-in brands or build your own list (custom brand
DEFAULT) to extend detection.
Parameters
display name of the brand (e.g. "VISA").
formatted display pattern, e.g. "#### #### #### ####".
pattern that matches card numbers belonging to this brand.
checksum used to validate the full number.
set of valid total card-number lengths.
set of valid CVC lengths for this brand.
drawable resource for the brand's front-of-card icon.
drawable resource for the matching CVC icon.