Form
fun Form(modifier: Modifier = Modifier, validator: FormValidator = FormValidator(), verticalArrangement: Arrangement.Vertical = Arrangement.Top, horizontalAlignment: Alignment.Horizontal = Alignment.Start, content: @Composable ColumnScope.() -> Unit = {})
fun Form(modifier: Modifier = Modifier, validator: FormValidator = FormValidator(), snackBarProperties: SnackBarProperties = SnackBarProperties(), content: @Composable ColumnScope.() -> Unit = {})
Overload of Form that shows a snack bar with validation error. Suggestion -> When this overload is used, do not show the error for each field in the form with FormValidator.ValidationField.onError since the purpose of this form is to show one error at a time.
Parameters
modifier
Modifier for the Form i.e Column
snack Bar Properties
The properties(SnackBarProperties) for the snackbar that is shown when the form fails validation
lifecycle Owner
Used to observe validation and dispose observer
validator
The FormValidator that controls the form.