limited string lengths

This commit is contained in:
t.ruspekhofer 2022-02-27 00:45:14 +01:00
parent 7113e3abee
commit 210020ece5
7 changed files with 42 additions and 5 deletions

View file

@ -15,9 +15,11 @@ namespace Lieb.Models.GuildWars2.Raid
public int RaidId { get; private set; }
[Required]
[StringLength(100, ErrorMessage = "Title too long (100 character limit).")]
public string Title { get; set; } = String.Empty;
[Required]
[StringLength(1000, ErrorMessage = "Description too long (1000 character limit).")]
public string Description { get; set; } = String.Empty;
[Required]
@ -30,12 +32,15 @@ namespace Lieb.Models.GuildWars2.Raid
public DateTimeOffset EndTime { get; set; }
[Required]
[StringLength(50, ErrorMessage = "Organizer too long (50 character limit).")]
public string Organizer { get; set; } = String.Empty;
[Required]
[StringLength(50, ErrorMessage = "Guild too long (50 character limit).")]
public string Guild { get; set; } = String.Empty;
[Required]
[StringLength(50, ErrorMessage = "VoiceChat too long (50 character limit).")]
public string VoiceChat { get; set; } = String.Empty;
[Required]