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
UsernameErrorMessage
An optional error message that is caused by the username
public abstract string UsernameErrorMessage { get; set; }
Property Value
The form's email address
public abstract string Email { get; set; }
Property Value
EmailErrorMessage
An optional error message that is caused by the email address
public abstract string EmailErrorMessage { get; set; }
Property Value
Password
The form's password
public abstract string Password { get; set; }
Property Value
PasswordErrorMessage
An optional error message that is caused by the password
public abstract string PasswordErrorMessage { get; set; }
Property Value
ServerErrorMessage
An optional error message that is caused by some internal server error
public abstract string ServerErrorMessage { get; set; }
Property Value
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
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