rememberVgsCardholderTextFieldState

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",
)

Parameters

collect

the VGSCollect instance the field is bound to.

fieldName

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.

tokenizationConfig

optional; when set, the value is tokenized on submit and the token is sent in place of the raw value.