rememberVgsSsnTextFieldState

Creates and remembers a VgsSsnTextFieldState for use with a VgsSsnTextField. This is the only way to obtain an instance — direct construction is internal to the SDK.

var state by rememberVgsSsnTextFieldState(
collect = vgsCollect,
fieldName = "data.ssn",
)

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, default required + length + SSN-pattern validation applies. 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.