SignUpScreenData
Immutable data class representing the state of the registration form.
This class manages the state of the sign-up form with three validated fields. Each field uses TextFiledData to encapsulate both the field value and validation error messages, providing real-time feedback to users as they fill out the form.
Form validation is performed in SignUpViewModel methods (SignUpViewModel.updateName, SignUpViewModel.updateEmail, SignUpViewModel.updatePassword) which update the corresponding TextFiledData.errorMessage based on validation rules. The form is considered valid when all three fields have null error messages.
Usage context:
Route composable observes SignUpViewModel.signUpUiState which wraps this data class
Text field composables bind to name, email, and password with two-way data flow
Error messages from TextFiledData are displayed below each input field
Submit button is enabled only when all fields are valid (no error messages)
Registration success triggers navigation to home screen via repository flow
Parameters
Name field state with validation for full name format.
Email field state with validation for email format.
Password field state with validation for minimum requirements.
See also
ViewModel that manages this screen data
Data class for text field state with validation
Wrapper providing loading and error state