Implemented basic user auth, register, login, details and avatar stuff from helio

This commit is contained in:
Marcel Baumgartner
2023-10-15 19:19:47 +02:00
parent 3bb4e7daab
commit 49c893f515
41 changed files with 2079 additions and 212 deletions

View 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; } = "";
}