SignUpScreenData

data class SignUpScreenData(val name: TextFiledData = TextFiledData(String()), val email: TextFiledData = TextFiledData(String()), val password: TextFiledData = TextFiledData(String()))

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

Name field state with validation for full name format.

email

Email field state with validation for email format.

password

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

Constructors

Link copied to clipboard
constructor(name: TextFiledData = TextFiledData(String()), email: TextFiledData = TextFiledData(String()), password: TextFiledData = TextFiledData(String()))

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard