remember Vgs Card Number Text Field State
Creates and remembers a VgsCardNumberTextFieldState for use with a VgsCardNumberTextField. This is the only way to obtain an instance — direct construction is reserved for the SDK.
Use it inside a composable like any other Compose remember* factory:
var state by rememberVgsCardNumberTextFieldState(
collect = vgsCollect,
fieldName = "data.card_number",
)Parameters
the VGSCollect instance the field is bound to. The field participates in this instance's submit and analytics pipeline.
JSON key the value will be sent under by VGSCollect.asyncSubmit.
custom validators to apply. If null, the SDK applies default brand-aware validation. Pass emptyList() to disable validation.
when true, the field's required length/CVC rules adapt to the detected card brand (e.g. 15 digits for Amex).
which brands the field will accept and detect. Defaults to VgsCardBrand.DEFAULT.
optional config; when set, the value is tokenized on submit and the token is sent in place of the raw number.