Implemented basic user auth, register, login, details and avatar stuff from helio
This commit is contained in:
16
Moonlight/App/Models/Forms/UpdateUserForm.cs
Normal file
16
Moonlight/App/Models/Forms/UpdateUserForm.cs
Normal file
@@ -0,0 +1,16 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace Moonlight.App.Models.Forms;
|
||||
|
||||
public class UpdateUserForm
|
||||
{
|
||||
[Required(ErrorMessage = "You need to enter a username")]
|
||||
[MinLength(7, ErrorMessage = "The username is too short")]
|
||||
[MaxLength(20, ErrorMessage = "The username cannot be longer than 20 characters")]
|
||||
[RegularExpression("^[a-z][a-z0-9]*$", ErrorMessage = "Usernames can only contain lowercase characters and numbers")]
|
||||
public string Username { get; set; } = "";
|
||||
|
||||
[Required(ErrorMessage = "You need to enter a email address")]
|
||||
[EmailAddress(ErrorMessage = "You need to enter a valid email address")]
|
||||
public string Email { get; set; } = "";
|
||||
}
|
||||
Reference in New Issue
Block a user