Added form proccessing screen (not finished). Some ui changes. User model form validations partly

This commit is contained in:
Marcel Baumgartner
2023-03-27 03:25:41 +02:00
parent 3611b745ff
commit b5b2dea0c7
5 changed files with 71 additions and 47 deletions

View File

@@ -1,4 +1,5 @@
using Moonlight.App.Models.Misc;
using System.ComponentModel.DataAnnotations;
using Moonlight.App.Models.Misc;
namespace Moonlight.App.Database.Entities;
@@ -10,7 +11,13 @@ public class User
public string FirstName { get; set; } = "";
public string LastName { get; set; } = "";
[Required(ErrorMessage = "You need to enter an email address")]
[EmailAddress(ErrorMessage = "You need to enter a valid email address")]
public string Email { get; set; } = "";
[Required(ErrorMessage = "You need to enter a password")]
[MinLength(8, ErrorMessage = "You need to enter a password with minimum 8 characters in lenght")]
public string Password { get; set; } = "";
public string Address { get; set; } = "";
public string City { get; set; } = "";