remember Vgs Ssn Text Field State
fun rememberVgsSsnTextFieldState(collect: VGSCollect, fieldName: String, validators: List<VgsTextFieldValidator>? = null, tokenizationConfig: VgsSsnTokenizationConfig? = null): MutableState<VgsSsnTextFieldState>
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",
)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, default required + length + SSN-pattern validation applies. 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.