Skip to content

ISignupFormVm

Namespace: SlottyMedia.Backend.ViewModel.Partial.SignUp

This ViewModel is used for the app's signup page. It represents the form's internal state and provides functionalities for submitting the form as well.

public interface ISignupFormVm

Properties

Username

The form's username

public abstract string Username { get; set; }

Property Value

String

UsernameErrorMessage

An optional error message that is caused by the username

public abstract string UsernameErrorMessage { get; set; }

Property Value

String

Email

The form's email address

public abstract string Email { get; set; }

Property Value

String

EmailErrorMessage

An optional error message that is caused by the email address

public abstract string EmailErrorMessage { get; set; }

Property Value

String

Password

The form's password

public abstract string Password { get; set; }

Property Value

String

PasswordErrorMessage

An optional error message that is caused by the password

public abstract string PasswordErrorMessage { get; set; }

Property Value

String

ServerErrorMessage

An optional error message that is caused by some internal server error

public abstract string ServerErrorMessage { get; set; }

Property Value

String

Methods

SubmitSignupForm()

Attempts to submit the form. If this is successful, then the user was signed up successfully and cookies have been set. Otherwise, an exception is thrown.

Task SubmitSignupForm()

Returns

Task

Exceptions

ArgumentException
If an input field was left empty but was required

UsernameAlreadyExistsException
If the username is already in use

EmailAlreadyExistsException
If the email address is already in use