remember Vgs Cardholder Text Field State
fun rememberVgsCardholderTextFieldState(collect: VGSCollect, fieldName: String, validators: List<VgsTextFieldValidator>? = null, tokenizationConfig: VgsCardholderTokenizationConfig? = null): MutableState<VgsCardholderTextFieldState>
Creates and remembers a VgsCardholderTextFieldState for use with a VgsCardholderTextField. This is the only way to obtain an instance — direct construction is internal to the SDK.
var state by rememberVgsCardholderTextFieldState(
collect = vgsCollect,
fieldName = "data.name",
)Content copied to clipboard
Parameters
collect
the VGSCollect instance the field is bound to.
field Name
JSON key the value will be sent under by VGSCollect.asyncSubmit.
validators
custom validators. If null, the SDK applies default required + name-pattern validation. Pass emptyList() to disable validation.
tokenization Config
optional; when set, the value is tokenized on submit and the token is sent in place of the raw value.