Skip to content

Instantly share code, notes, and snippets.

@azamsharp
Created March 4, 2020 14:38
Show Gist options
  • Save azamsharp/4915e6f236fc914cce290de01025db2f to your computer and use it in GitHub Desktop.
Save azamsharp/4915e6f236fc914cce290de01025db2f to your computer and use it in GitHub Desktop.
class RegistrationViewModel: ObservableObject {
@Validated(.required(errorMessage: "First name cannot be empty"))
var firstname: String? = ""
@Validated(.required(errorMessage: "Last name cannot be empty"))
var lastname: String? = ""
@Validated(.required(errorMessage: "Username cannot be empty"))
var username: String? = ""
@Validated(.required(errorMessage: "Password cannot be empty"))
var password: String? = ""
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment